mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
fix(core): replace systick based wait in display SPI with loop as systick does not work in fault handlers
[no changelog]
This commit is contained in:
parent
0a4b7eb06f
commit
ad1f2360bd
@ -127,7 +127,10 @@ int display_backlight(int val) {
|
||||
SPI_HandleTypeDef spi_handle;
|
||||
|
||||
static inline void spi_send(const uint8_t *data, int len) {
|
||||
HAL_Delay(1);
|
||||
volatile int32_t timeout = 1000;
|
||||
for (int i = 0; i < timeout; i++)
|
||||
;
|
||||
|
||||
if (HAL_OK != HAL_SPI_Transmit(&spi_handle, (uint8_t *)data, len, 1000)) {
|
||||
// TODO: error
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user