1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup RTEMSBSPsARMLPC24XX_lcd |
---|
5 | * |
---|
6 | * @brief LCD support. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2010-2012 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Obere Lagerstr. 30 |
---|
14 | * 82178 Puchheim |
---|
15 | * Germany |
---|
16 | * <rtems@embedded-brains.de> |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.rtems.org/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef LIBBSP_ARM_LPC24XX_LCD_H |
---|
24 | #define LIBBSP_ARM_LPC24XX_LCD_H |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | |
---|
28 | #include <bsp/io.h> |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif |
---|
33 | |
---|
34 | /** |
---|
35 | * @defgroup lpc_dma LCD Support |
---|
36 | * |
---|
37 | * @ingroup RTEMSBSPsARMLPC24XX |
---|
38 | * |
---|
39 | * @brief LCD support. |
---|
40 | * |
---|
41 | * @{ |
---|
42 | */ |
---|
43 | |
---|
44 | typedef enum { |
---|
45 | #ifdef ARM_MULTILIB_ARCH_V4 |
---|
46 | LCD_MODE_STN_4_BIT = 0, |
---|
47 | LCD_MODE_STN_8_BIT, |
---|
48 | LCD_MODE_STN_DUAL_PANEL_4_BIT, |
---|
49 | LCD_MODE_STN_DUAL_PANEL_8_BIT, |
---|
50 | LCD_MODE_TFT_12_BIT_4_4_4, |
---|
51 | LCD_MODE_TFT_16_BIT_5_6_5, |
---|
52 | LCD_MODE_TFT_16_BIT_1_5_5_5, |
---|
53 | LCD_MODE_TFT_24_BIT, |
---|
54 | LCD_MODE_DISABLED |
---|
55 | #else |
---|
56 | LCD_MODE_STN_4_BIT = 0x4, |
---|
57 | LCD_MODE_STN_8_BIT = 0x6, |
---|
58 | LCD_MODE_STN_DUAL_PANEL_4_BIT = 0x84, |
---|
59 | LCD_MODE_STN_DUAL_PANEL_8_BIT = 0x86, |
---|
60 | LCD_MODE_TFT_12_BIT_4_4_4 = 0x2e, |
---|
61 | LCD_MODE_TFT_16_BIT_5_6_5 = 0x2c, |
---|
62 | LCD_MODE_TFT_16_BIT_1_5_5_5 = 0x28, |
---|
63 | LCD_MODE_TFT_24_BIT = 0x2a, |
---|
64 | LCD_MODE_DISABLED = 0xff |
---|
65 | #endif |
---|
66 | } lpc24xx_lcd_mode; |
---|
67 | |
---|
68 | /** |
---|
69 | * @brief Set the LCD @a mode. |
---|
70 | * |
---|
71 | * The pins are configured according to @a pins. |
---|
72 | * |
---|
73 | * @see lpc24xx_pin_config(). |
---|
74 | * |
---|
75 | * @retval RTEMS_SUCCESSFUL Successful operation. |
---|
76 | * @retval RTEMS_IO_ERROR Invalid mode. |
---|
77 | */ |
---|
78 | rtems_status_code lpc24xx_lcd_set_mode( |
---|
79 | lpc24xx_lcd_mode mode, |
---|
80 | const lpc24xx_pin_range *pins |
---|
81 | ); |
---|
82 | |
---|
83 | lpc24xx_lcd_mode lpc24xx_lcd_current_mode(void); |
---|
84 | |
---|
85 | /** @} */ |
---|
86 | |
---|
87 | #ifdef __cplusplus |
---|
88 | } |
---|
89 | #endif /* __cplusplus */ |
---|
90 | |
---|
91 | #endif /* LIBBSP_ARM_LPC24XX_LCD_H */ |
---|