summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm3240g-eval/src/up_lcd.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-25 22:14:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-04-25 22:14:00 +0000
commit29d916f11e865afefe144aba44146a7d4acca5e4 (patch)
tree111f0e4a2fc639b6cc9c45fc669937213ae2fc95 /nuttx/configs/stm3240g-eval/src/up_lcd.c
parentffcaa123f477ac9062398c06b68950203f0c899a (diff)
downloadpx4-nuttx-29d916f11e865afefe144aba44146a7d4acca5e4.tar.gz
px4-nuttx-29d916f11e865afefe144aba44146a7d4acca5e4.tar.bz2
px4-nuttx-29d916f11e865afefe144aba44146a7d4acca5e4.zip
STM3240G-EVAL LCD updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4656 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm3240g-eval/src/up_lcd.c')
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_lcd.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/nuttx/configs/stm3240g-eval/src/up_lcd.c b/nuttx/configs/stm3240g-eval/src/up_lcd.c
index 66d52985f..649d468fe 100644
--- a/nuttx/configs/stm3240g-eval/src/up_lcd.c
+++ b/nuttx/configs/stm3240g-eval/src/up_lcd.c
@@ -36,7 +36,7 @@
**************************************************************************************/
/* This driver supports the following LCDs on the STM324xG_EVAL board:
*
- * AM-240320L8TNQW00H (LCD_ILI9320) and
+ * AM-240320L8TNQW00H (LCD_ILI9320 or LCD_ILI9321) and
* AM-240320D5TOQW01H (LCD_ILI9325)
*/
@@ -69,7 +69,7 @@
**************************************************************************************/
/* Configuration **********************************************************************/
/* CONFIG_STM32_ILI9320_DISABLE may be defined to disabled the AM-240320L8TNQW00H
- * (LCD_ILI9320)
+ * (LCD_ILI9320 or LCD_ILI9321)
* CONFIG_STM32_ILI9325_DISABLE may be defined to disabled the AM-240320D5TOQW01H
* (LCD_ILI9325)
*/
@@ -169,9 +169,9 @@
#define STM3240G_COLORFMT FB_FMT_RGB16_565
/* STM3240G-EVAL LCD Hardware Definitions *********************************************/
-/* LCD /CS is CE4, Bank 4 of NOR/SRAM Bank 1~4 */
+/* LCD /CS is CE4, Bank 3 of NOR/SRAM Bank 1~4 */
-#define STM3240G_LCDBASE ((uint32_t)(0x60000000 | 0x0c000000))
+#define STM3240G_LCDBASE ((uint32_t)(0x60000000 | 0x08000000))
#define LCD ((struct lcd_regs_s *) STM3240G_LCDBASE)
#define LCD_REG_0 0x00
@@ -288,6 +288,7 @@
/* LCD IDs */
#define ILI9320_ID 0x9320
+#define ILI9321_ID 0x9321
#define ILI9325_ID 0x9325
/* Debug ******************************************************************************/
@@ -1016,10 +1017,10 @@ static inline void stm3240g_lcdinitialize(void)
id = stm3240g_readreg(LCD_REG_0);
lcddbg("LCD ID: %04x\n", id);
- /* Check if the ID is for the STM32_ILI9320 & STM32_ILI9325 */
+ /* Check if the ID is for the STM32_ILI9320 (or ILI9321) & STM32_ILI9325 */
#if !defined(CONFIG_STM32_ILI9320_DISABLE)
- if (id == 0x9320)
+ if ((id == ILI9320_ID) || (id == ILI9321_ID))
{
g_lcddev.type = LCD_TYPE_ILI9320;
lcddbg("LCD type: %d\n", g_lcddev.type);
@@ -1114,7 +1115,7 @@ static inline void stm3240g_lcdinitialize(void)
else
#endif
#if !defined(CONFIG_STM32_ILI9325_DISABLE)
- if (id == 0x9325)
+ if (id == ILI9325_ID)
{
g_lcddev.type = LCD_TYPE_ILI9325;
lcddbg("LCD type: %d\n", g_lcddev.type);