1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

boardloader+bootloader: remove unneded STM32 include

This commit is contained in:
Pavol Rusnak 2017-09-29 10:11:12 +02:00
parent ad614a364f
commit a055f4e8fb
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 14 additions and 5 deletions

View File

@ -1,5 +1,3 @@
#include STM32_HAL_H
#include <string.h>
#include "common.h"

View File

@ -1,5 +1,3 @@
#include STM32_HAL_H
#include <string.h>
#include <sys/types.h>
#include <assert.h>
@ -82,7 +80,7 @@ void check_and_jump(void)
display_printf("valid firmware signature\n");
display_vendor(vhdr.vimg, (const char *)vhdr.vstr, vhdr.vstr_len, hdr.version);
HAL_Delay(1000); // TODO: remove?
touch_click();
jump_to(FIRMWARE_START + vhdr.hdrlen + HEADER_SIZE);
} else {

View File

@ -79,6 +79,18 @@ uint32_t touch_read(void) {
return 0;
}
void touch_click(void)
{
// flush touch events if any
while (touch_read()) { }
// wait for TOUCH_START
while ((touch_read() & TOUCH_START) == 0) { }
// wait for TOUCH_END
while ((touch_read() & TOUCH_END) == 0) { }
// flush touch events if any
while (touch_read()) { }
}
void I2C1_EV_IRQHandler(void) {
HAL_I2C_EV_IRQHandler(&i2c_handle);
}

View File

@ -14,5 +14,6 @@
int touch_init(void);
uint32_t touch_read(void);
void touch_click(void);
#endif