-
Notifications
You must be signed in to change notification settings - Fork 1
/
displayconfigapp.h
64 lines (55 loc) · 2.76 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
57
58
59
60
61
62
63
64
/***************************************************************************//**
* @file displayconfigapp.h
* @brief Display application specific configuration file.
* @version 4.4.0
*******************************************************************************
* @section License
* <b>Copyright 2015 Silicon Labs, Inc. http://www.silabs.com</b>
*******************************************************************************
*
* This file is licensed under the Silabs License Agreement. See the file
* "Silabs_License_Agreement.txt" for details. Before using this software for
* any purpose, you must agree to the terms of that agreement.
*
******************************************************************************/
#ifndef __SILICON_LABS_DISPLAY_CONFIG_APP_H__
#define __SILICON_LABS_DISPLAY_CONFIG_APP_H__
#include "ble-configuration.h"
#include "board_features.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
#ifndef FEATURE_IOEXPANDER
/**
* Don't define a repeat function for display pal toggle for ECEN5826. We will handle
* this pin toggle through timer overflow.
*/
//#define PAL_TIMER_REPEAT_FUNCTION (rtcIntCallbackRegister)
#define POLARITY_INVERSION_EXTCOMIN_MANUAL
#endif /* FEATURE_IOEXPANDER */
extern int rtcIntCallbackRegister (void(*pFunction)(void*),
void* argument,
unsigned int frequency);
#endif /* __SILICON_LABS_DISPLAY_CONFIG_APP_H__ */