/* The following is responsible for initializing the target hardware.*/ static void ConfigureHardware(void) { SetAllPinsToOutputs(); SetupClockAndPowerManagementModule(); SetupAclkToRadio(); InitDebugUart(); BLUETOOTH_SIDEBAND_CONFIG(); CONFIG_OLED_PINS(); #ifdef HW_DEVBOARD_V2 CONFIG_DEBUG_PINS(); CONFIG_LED_PINS(); #endif #ifdef DIGITAL DISABLE_LCD_LED(); #endif CONFIG_SRAM_PINS(); APPLE_CONFIG(); /* the accelerometer may not be used so configure its pins here */ CONFIG_ACCELEROMETER_PINS(); CONFIG_ACCELEROMETER_PINS_FOR_SLEEP(); }
/* The following is responsible for initializing the target hardware.*/ void ConfigureDefaultIO(void) { // Setting DIR = 1 and SEL = 1 enables ACLK out on P11.0 // and disable MCLK and SMCLK P11DIR |= BIT0; P11SEL |= BIT0; BluetoothSidebandConfig(); #if ANALOG CONFIG_OLED_PINS(); #endif #ifdef HW_DEVBOARD_V2 CONFIG_DEBUG_PINS(); CONFIG_LED_PINS(); #endif CONFIG_SRAM_PINS(); APPLE_CONFIG(); CONFIG_ACCELEROMETER_PINS(); if (BoardType >= 2) ENABLE_ACCELEROMETER_POWER(); #if ISOLATE_RADIO SetRadioControlPinsToInputs(); #endif }