diff --git a/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.c b/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.c index 2654f28..cb3cb37 100644 --- a/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.c +++ b/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.c @@ -78,7 +78,11 @@ const uint8_t gc9a01_init_seq[] = { 0x02, 0, 0x8E, 0xFF, 0x02, 0, 0x8F, 0xFF, 0x03, 0, 0xB6, 0x00, 0x00, +#if HARDWARE_PLATFORM == SMART_WATCH_BREADBOARD 0x02, 0, 0x36, 0x88, +#elif HARDWARE_PLATFORM == SMART_WATCH_PCB + 0x02, 0, 0x36, 0x48, +#endif 0x02, 0, 0x3A, 0x55, 0x05, 0, 0x90, 0x08, 0x08, 0x08, 0x08, 0x02, 0, 0xBD, 0x06, @@ -416,7 +420,7 @@ void lcd_sleep(LCDConfig_t *const LCDConfig, bool state) lcd_set_data_command(LCDConfig, LCD_DATA); } -void lcd_orientation(LCDConfig_t *const LCDConfig, LCDOrientation_t orientation) +void lcd_orientation(LCDConfig_t *const LCDConfig, LCDOrientation_e orientation) { if(!LCDConfig) return; @@ -434,6 +438,7 @@ void lcd_orientation(LCDConfig_t *const LCDConfig, LCDOrientation_t orientation) switch(orientation) { +#if HARDWARE_PLATFORM == SMART_WATCH_BREADBOARD case LCD_ORIENTATION_90: mmc_sdio_driver_write_one(0xE8); break; @@ -445,6 +450,19 @@ void lcd_orientation(LCDConfig_t *const LCDConfig, LCDOrientation_t orientation) break; default: //Is default orientation eg : 0 mmc_sdio_driver_write_one(0x88); +#elif HARDWARE_PLATFORM == SMART_WATCH_PCB + case LCD_ORIENTATION_90: + mmc_sdio_driver_write_one(0x28); + break; + case LCD_ORIENTATION_180: + mmc_sdio_driver_write_one(0x88); + break; + case LCD_ORIENTATION_270: + mmc_sdio_driver_write_one(0xE8); + break; + default: //Is default orientation eg : 0 + mmc_sdio_driver_write_one(0x48); +#endif } lcd_set_cs(LCDConfig, LCD_RELEASED); diff --git a/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.h b/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.h index f319fff..91abb1f 100644 --- a/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.h +++ b/src/W800_SDK_v1.00.10/app/app_drivers/lcd/lcd.h @@ -46,7 +46,7 @@ typedef enum LCDOrientation LCD_ORIENTATION_90, LCD_ORIENTATION_180, LCD_ORIENTATION_270, -} LCDOrientation_t; +} LCDOrientation_e; /** * @brief @@ -62,7 +62,7 @@ typedef struct LCDConfig enum tls_io_name LCDResetPin; DrawFinishedCb_t drawFinishedCb; void *cbArg; - LCDOrientation_t LCDOrientation; + LCDOrientation_e LCDOrientation; } LCDConfig_t; /** @@ -139,8 +139,12 @@ void lcd_sleep(LCDConfig_t * const LCDConfig, bool state); * @brief Sets the LCD orientation. * * @param LCDConfig a pointer to a user allocated LCDConfig_t structure - * @param orientation the value of the orientation to set + * @param orientation the value of the orientation to set : + * - LCD_ORIENTATION_DEFAULT or LCD_ORIENTATION_0 + * - LCD_ORIENTATION_90 + * - LCD_ORIENTATION_180 + * - LCD_ORIENTATION_270 */ -void lcd_orientation(LCDConfig_t * const LCDConfig, LCDOrientation_t orientation); +void lcd_orientation(LCDConfig_t * const LCDConfig, LCDOrientation_e orientation); #endif //LCD_H \ No newline at end of file