Fixed an issue when sending commands to the LCD screen while a DMA
transfer is in progress causing graphical issues Detail : A DMA transfer may be in progress when trying to send single byte commands to the LCD screen. This could badly configure the display as soon as the data/command select pin was set to command while the DMA was still sending data bytes. The fix : doing a busy wait in the lcd_set_data function to be sure the bus is free to use.
This commit is contained in:
parent
a58c453f58
commit
2b79a31165
@ -382,7 +382,6 @@ void lcd_set_backlight(LCDConfig_t * const LCDConfig, uint8_t brightness)
|
||||
tls_gpio_cfg(LCDConfig->LCDPWMBacklightPin, WM_GPIO_DIR_OUTPUT, WM_GPIO_ATTR_FLOATING);
|
||||
tls_gpio_write(LCDConfig->LCDPWMBacklightPin, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void lcd_hardware_reset(LCDConfig_t * const LCDConfig)
|
||||
@ -523,5 +522,8 @@ static void lcd_set_cs(LCDConfig_t * const LCDConfig, LCDSelect_e selected)
|
||||
|
||||
static void lcd_set_data_command(LCDConfig_t * const LCDConfig, LCDDataCommand_e dataCommand)
|
||||
{
|
||||
// We wait for the mmc sdio driver to be ready before changing the LCD access mode
|
||||
mmc_sdio_driver_blocking_wait_bus_free();
|
||||
|
||||
tls_gpio_write(LCDConfig->LCDDataCommandPin, dataCommand);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user