diff --git a/src/gta02/gta02.c b/src/gta02/gta02.c index fd84329..518f158 100644 --- a/src/gta02/gta02.c +++ b/src/gta02/gta02.c @@ -293,6 +293,11 @@ static void putc_gta02(char c) serial_putc_s3c24xx(GTA02_DEBUG_UART, c); } +int aux_key_pressed(void) +{ + return !!(rGPFDAT & (1 << 6)); +} + /* * our API for bootloader on this machine */ diff --git a/src/start_qi.c b/src/start_qi.c index ac7d42e..c6f260f 100644 --- a/src/start_qi.c +++ b/src/start_qi.c @@ -34,6 +34,7 @@ #define stringify1(s) #s extern void bootloader_second_phase(void); +extern int aux_key_pressed(void); const struct board_api * boards[] = { &board_api_gta02, @@ -98,9 +99,21 @@ void start_qi(void) } /* okay, do the critical port and serial init for our board */ - this_board->port_init(); + int i = 0; + for(i=0;i<60000;i++) + { + blue_on(100); + if(aux_key_pressed()) + { + puts("aux key pressed\n"); + goto unhappy; + orange_on(6000); + break; + } + } + /* stick some hello messages on debug console */ puts("\n\n\nQi Bootloader "stringify2(BUILD_HOST)" "