-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisplayconfigapp.h
56 lines (51 loc) · 2.61 KB
/
displayconfigapp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/***************************************************************************//**
* @file
* @brief Display application specific configuration file.
*******************************************************************************
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#ifndef _DISPLAY_CONFIG_APP_H_
#define _DISPLAY_CONFIG_APP_H_
/* Include pixel matrix allocation support. */
#define PIXEL_MATRIX_ALLOC_SUPPORT
/* Enable allocation of pixel matrices from the static pixel matrix pool.
NOTE:
The allocator does not support free'ing pixel matrices. It allocates
continuosly from the static pool without keeping track of the sizes of
old allocations. I.e. this is a one-shot allocator, and the user should
allocate buffers once at the beginning of the program.
*/
#define USE_STATIC_PIXEL_MATRIX_POOL
/* Specify the size of the static pixel matrix pool. For the weatherstation demo
we need one pixel matrix (framebuffer) covering the whole display.
*/
#define PIXEL_MATRIX_POOL_SIZE (DISPLAY0_HEIGHT * DISPLAY0_WIDTH / 8)
/* On EFM32ZG_STK3200, the DISPLAY driver Platform Abstraction Layer (PAL)
uses the RTC to time and toggle the EXTCOMIN pin of the Sharp memory
LCD per default. However, the watch example wants to use the RTC to
keep track of time, i.e. generate interrupt every second. Therefore
the watch example implements a function (rtcIntCallbackRegister)) that
enables the PAL to register the callback function that needs to be called in
order to toggle the EXTCOMIN pin.
I.e we need to undefine the INCLUDE_PAL_GPIO_PIN_AUTO_TOGGLE (which
is defined by default and uses the RTC) and we need to define the
PAL_TIMER_REPEAT_FUNCTION. */
#undef INCLUDE_PAL_GPIO_PIN_AUTO_TOGGLE
#undef POLARITY_INVERSION_EXTCOMIN_PAL_AUTO_TOGGLE
#if 1
#define PAL_TIMER_REPEAT_FUNCTION (rtcIntCallbackRegister)
extern int rtcIntCallbackRegister (void(*pFunction)(void*),
void* argument,
unsigned int frequency);
#endif
#endif /* _DISPLAY_CONFIG_APP_H_ */