boardloader+bootloader: remove unneded STM32 include

pull/25/head
Pavol Rusnak 7 years ago
parent ad614a364f
commit a055f4e8fb
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

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

@ -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 {

@ -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);
}

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

Loading…
Cancel
Save