\r
# Set DEBUGBUILD to 'TRUE' for full debugging (larger, slower binaries), \r
# or to 'FALSE' for release builds (smallest, fastest binaries)\r
-DEBUGBUILD = TRUE\r
+DEBUGBUILD = FALSE\r
\r
##########################################################################\r
# IDE Flags (Keeps various IDEs happy)\r
}
void rbInit() {
+ RB_HB0_IO &= ~IOCON_SWDIO_PIO1_3_FUNC_MASK;
+ RB_HB0_IO |= IOCON_SWDIO_PIO1_3_FUNC_GPIO;
+ RB_HB1_IO &= ~IOCON_JTAG_TCK_PIO0_10_FUNC_MASK;
+ RB_HB1_IO |= IOCON_JTAG_TCK_PIO0_10_FUNC_GPIO;
+
struct {
int port;
int pin;
{ RB_BTN2 , &RB_BTN2_IO },
{ RB_BTN3 , &RB_BTN3_IO },
{ RB_BTN4 , &RB_BTN4_IO },
- { RB_HB3 , &RB_HB3_IO },
- { RB_HB4 , &RB_HB4_IO },
+ { RB_HB0 , &RB_HB0_IO },
+ { RB_HB1 , &RB_HB1_IO },
{ RB_PWR_CHRG, &RB_PWR_CHRG_IO }
};
{ RB_SPI_SS4 , 1 },
{ RB_SPI_SS5 , 1 },
{ RB_LCD_BL , 0 },
- { RB_HB0 , 1 },
- { RB_HB1 , 1 },
{ RB_HB2 , 1 },
+ { RB_HB3 , 1 },
+ { RB_HB4 , 1 },
{ RB_HB5 , 1 }
};
cpuInit();
systickInit(CFG_SYSTICK_DELAY_IN_MS);
-// pmuInit();
-// adcInit();
+ // pmuInit();
+ // adcInit();
rbInit();
+
usbMSCInit();
badge_display_init();
if (gpioGetValue(RB_BTN0) == 0) { result |= BADGE_EVENT_KEY_LEFT ; }
if (gpioGetValue(RB_BTN1) == 0) { result |= BADGE_EVENT_KEY_RIGHT ; }
// TODO: Knöpfe.
- if (gpioGetValue(RB_HB3) == 0) { result |= BADGE_EVENT_KEY_UP ; }
- if (gpioGetValue(RB_HB4) == 0) { result |= BADGE_EVENT_KEY_UP ; }
+ if (gpioGetValue(RB_HB0) == 0) { result |= BADGE_EVENT_KEY_UP ; }
+ if (gpioGetValue(RB_HB1) == 0) { result |= BADGE_EVENT_KEY_UP ; }
return result;
}
// Hackerbus
#define RB_HB0 1,3
-#define RB_HB0_IO IOCON_PIO1_3
+#define RB_HB0_IO IOCON_SWDIO_PIO1_3
#define RB_HB1 0,10
-#define RB_HB1_IO IOCON_PIO0_10
+#define RB_HB1_IO IOCON_JTAG_TCK_PIO0_10
#define RB_HB2 1,1
#define RB_HB2_IO IOCON_PIO1_1