diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-11-13 23:31:21 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-11-13 23:31:21 +0100 |
commit | 4467b814f221c90455c23abadf537b4199a0de51 (patch) | |
tree | e99dceef5c22822a3e7beed97bd996c51e7a39cf /drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h | |
parent | 2a01ab676296cee33ae9b693a1f7b7d04eec9405 (diff) | |
download | uGFX-4467b814f221c90455c23abadf537b4199a0de51.tar.gz uGFX-4467b814f221c90455c23abadf537b4199a0de51.tar.bz2 uGFX-4467b814f221c90455c23abadf537b4199a0de51.zip |
implemented contrast and backlight functions for GDISP. Implemented those into ILI9320
Diffstat (limited to 'drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h')
-rw-r--r-- | drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h index 6786e63f..0b926bb8 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h +++ b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h @@ -42,6 +42,7 @@ static __inline void GDISP_LLD(init_board)(void) { palSetBusMode(&busD, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetBusMode(&busE, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
palSetPadMode(GPIOE, GPIOE_TFT_RST, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOD, GPIOD_TFT_LIGHT, PAL_MODE_OUTPUT_PUSHPULL);
/* const unsigned char FSMC_Bank = 0; */
const unsigned char FSMC_Bank = 6;
@@ -73,6 +74,13 @@ static __inline uint16_t GDISP_LLD(read_data)(void) { return GDISP_RAM;
}
+static __inline void GDISP_LLD(set_backlight)(uint8_t percent) {
+ if(percent == 100)
+ palClearPad(GPIOD, GPIOD_TFT_LIGHT);
+ else
+ palSetPad(GPIOD, GPIOD_TFT_LIGHT);
+}
+
#endif /* GDISP_LLD_BOARD_H */
/** @} */
|