mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
move APPVER guards from includes to app code
This commit is contained in:
parent
df524b9f35
commit
2707e8aff6
@ -241,8 +241,10 @@ void usbInit(void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifndef APPVER
|
||||
setup();
|
||||
oledInit();
|
||||
#endif
|
||||
usbInit();
|
||||
|
||||
passlen = strlen((char *)pass);
|
||||
|
@ -29,8 +29,12 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifndef APPVER
|
||||
setup();
|
||||
oledInit();
|
||||
#else
|
||||
setupApp();
|
||||
#endif
|
||||
// __stack_chk_guard_setup();
|
||||
#if DEBUG_LINK
|
||||
oledSetDebug(1);
|
||||
|
4
oled.h
4
oled.h
@ -29,11 +29,7 @@
|
||||
#define OLED_HEIGHT 64
|
||||
#define OLED_BUFSIZE (OLED_WIDTH * OLED_HEIGHT / 8)
|
||||
|
||||
#ifdef APPVER
|
||||
#define oledInit() do{}while(0)
|
||||
#else
|
||||
void oledInit(void);
|
||||
#endif
|
||||
void oledClear(void);
|
||||
void oledRefresh(void);
|
||||
|
||||
|
6
setup.c
6
setup.c
@ -66,3 +66,9 @@ void setup(void)
|
||||
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO11 | GPIO12);
|
||||
gpio_set_af(GPIOA, GPIO_AF10, GPIO11 | GPIO12);
|
||||
}
|
||||
|
||||
void setupApp(void)
|
||||
{
|
||||
// hotfix for old bootloader
|
||||
gpio_mode_setup(GPIOA, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO9);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user