move APPVER guards from includes to app code

pull/25/head
Pavol Rusnak 10 years ago
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);

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

@ -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__
#ifdef APPVER
#define setup() do{}while(0)
#else
void setup(void);
#endif
void setupApp(void);
#endif

Loading…
Cancel
Save