@ -241,8 +241,10 @@ void usbInit(void)
int main(void)
{
#ifndef APPVER
setup();
oledInit();
#endif
usbInit();
passlen = strlen((char *)pass);
@ -29,8 +29,12 @@
#else
setupApp();
// __stack_chk_guard_setup();
#if DEBUG_LINK
oledSetDebug(1);
@ -29,11 +29,7 @@
#define OLED_HEIGHT 64
#define OLED_BUFSIZE (OLED_WIDTH * OLED_HEIGHT / 8)
#ifdef APPVER
#define oledInit() do{}while(0)
void oledInit(void);
void oledClear(void);
void oledRefresh(void);
@ -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);
@ -20,10 +20,7 @@
#ifndef __SETUP_H__
#define __SETUP_H__
#define setup() do{}while(0)
void setup(void);
void setupApp(void);