]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio/Source/SilLabs_Code/kits/SLSTK3401A_EFM32PG/config/textdisplayconfig.h
Add Pearl Gecko demo.
[freertos] / FreeRTOS / Demo / CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio / Source / SilLabs_Code / kits / SLSTK3401A_EFM32PG / config / textdisplayconfig.h
1 /***************************************************************************//**\r
2  * @file textdisplayconfig.h\r
3  * @brief Configuration file for textdisplay module.\r
4  * @version 4.2.1\r
5  *******************************************************************************\r
6  * @section License\r
7  * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>\r
8  *******************************************************************************\r
9  *\r
10  * This file is licensed under the Silabs License Agreement. See the file\r
11  * "Silabs_License_Agreement.txt" for details. Before using this software for\r
12  * any purpose, you must agree to the terms of that agreement.\r
13  *\r
14  ******************************************************************************/\r
15 \r
16 #ifndef __SILICON_LABS_TEXTDISPLAYCONFIG_H__\r
17 #define __SILICON_LABS_TEXTDISPLAYCONFIG_H__\r
18 \r
19 /* Include display configuration files here because the textdisplay\r
20    configuration depends on the display configuration. */\r
21 #include "displayconfig.h"\r
22 #include "displayconfigapp.h"\r
23 \r
24 /**\r
25  * Maximum number of text display devices the display module is configured\r
26  * to support. This number may be increased if the system includes more than\r
27  * one display device. However, the number should be kept low in order to\r
28  * save memory.\r
29  */\r
30 #define TEXTDISPLAY_DEVICES_MAX   (1)\r
31 \r
32 \r
33 /* Font definitions depending on which font is selected. */\r
34 #ifdef TEXTDISPLAY_FONT_8x8\r
35   #define FONT_WIDTH   (8)\r
36   #define FONT_HEIGHT  (8)\r
37 #endif\r
38 #ifdef TEXTDISPLAY_FONT_6x8\r
39   #define FONT_WIDTH   (6)\r
40   #define FONT_HEIGHT  (8)\r
41 #endif\r
42 #ifdef TEXTDISPLAY_NUMBER_FONT_16x20\r
43   #define FONT_WIDTH   (16)\r
44   #define FONT_HEIGHT  (20)\r
45 #endif\r
46 \r
47 \r
48 /**\r
49  * Determine the number of lines and columns of the text display devices.\r
50  * These constants are used for static memory allocation in the textdisplay\r
51  * device driver.\r
52  *\r
53  * Please make sure that the combined selection of font, lines and columns fits\r
54  * inside the DISPLAY geometry.\r
55  */\r
56 #ifndef TEXTDISPLAY_DEVICE_0_LINES\r
57 #define TEXTDISPLAY_DEVICE_0_LINES        (DISPLAY0_HEIGHT / FONT_HEIGHT)\r
58 #endif\r
59 #define TEXTDISPLAY_DEVICE_0_COLUMNS      (DISPLAY0_WIDTH / FONT_WIDTH)\r
60 \r
61 \r
62 /* Enable PixelMatrix allocation support in the display device driver.\r
63    The textdisplay module allocates a pixel matrix corresponding to one line of\r
64    text on the display. Therefore we need support for pixel matrix allocation.\r
65 */\r
66 #define PIXEL_MATRIX_ALLOC_SUPPORT\r
67 \r
68 /* Enable allocation of pixel matrices from the static pixel matrix pool.\r
69    NOTE:\r
70    The allocator does not support free'ing pixel matrices. It allocates\r
71    continuosly from the static pool without keeping track of the sizes of\r
72    old allocations. I.e. this is a one-shot allocator, and the  user should\r
73    allocate buffers once at the beginning of the program.\r
74 */\r
75 #define USE_STATIC_PIXEL_MATRIX_POOL\r
76 \r
77 /* Specify the size of the static pixel matrix pool. For the textdisplay\r
78    we need one line of text, that is, the font height (8) times the\r
79    display width (128 pixels divided by 8 bits per byte). */\r
80 #ifndef PIXEL_MATRIX_POOL_SIZE\r
81 #define PIXEL_MATRIX_POOL_SIZE       (FONT_HEIGHT * DISPLAY0_WIDTH/8)\r
82 #endif\r
83 /* The alignment of the pixel matrices must depend on the font width\r
84    in order to be handled correctly.*/\r
85 #define PIXEL_MATRIX_ALIGNMENT  (FONT_WIDTH/8 + ((FONT_WIDTH%8)?1:0))\r
86 \r
87 #endif /* __SILICON_LABS_TEXTDISPLAYCONFIG_H__ */\r