Skip to content

Commit

Permalink
fix(bw): initial wait delay in SPI LCD (#5433)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic authored Aug 15, 2024
1 parent 839cfbd commit fcd7ffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 4 additions & 5 deletions radio/src/targets/taranis/lcd_driver_aspi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

#include "board.h"
#include "lcd.h"

#include "hal/abnormal_reboot.h"
#include "timers_driver.h"

#if !defined(BOOT)
#include "myeeprom.h"
Expand Down Expand Up @@ -274,11 +276,8 @@ void lcdInitFinish()
*/

if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
#if !defined(BOOT)
while (g_tmr10ms < (RESET_WAIT_DELAY_MS/10)); // Wait measured from the power-on
#else
delay_ms(RESET_WAIT_DELAY_MS);
#endif
// wait measured from the power-on
while (timersGetMsTick() < RESET_WAIT_DELAY_MS);
}

lcdStart();
Expand Down
8 changes: 3 additions & 5 deletions radio/src/targets/taranis/lcd_driver_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "lcd.h"

#include "hal/abnormal_reboot.h"
#include "timers_driver.h"

#if !defined(BOOT)
#include "edgetx.h"
Expand Down Expand Up @@ -388,11 +389,8 @@ void lcdInitFinish()
*/

if (LCD_DELAY_NEEDED()) {
#if !defined(BOOT)
while (g_tmr10ms < (RESET_WAIT_DELAY_MS / 10)); // wait measured from the power-on
#else
delay_ms(RESET_WAIT_DELAY_MS);
#endif
// wait measured from the power-on
while (timersGetMsTick() < RESET_WAIT_DELAY_MS);
}

lcdStart();
Expand Down

0 comments on commit fcd7ffd

Please sign in to comment.