31 #ifdef PERIPHERALS_AUTO_INIT
37 #if defined RADIO_CONTROL
38 #if defined RADIO_CONTROL_BIND_IMPL_FUNC && defined SPEKTRUM_BIND_PIN_PORT
42 #if USE_UART0 || USE_UART1 || USE_UART2 || USE_UART3 || USE_UART4 || USE_UART5 || USE_UART6 || USE_UART7 || USE_UART8
46 #if USE_I2C0 || USE_I2C1 || USE_I2C2 || USE_I2C3 || USE_I2C4 || USE_SOFTI2C0 || USE_SOFTI2C1
50 #if USE_SOFTI2C0 || USE_SOFTI2C1
51 #define USING_SOFTI2C 1
57 #if USE_USB_SERIAL || USE_USB_SERIAL_DEBUG
58 #define USING_USB_SERIAL 1
129 #ifdef PERIPHERALS_AUTO_INIT
135 #if defined RADIO_CONTROL_POWER_PORT
139 #ifdef PERIPHERAL3V3_ENABLE_PORT
144 #if defined RADIO_CONTROL && defined RADIO_CONTROL_BIND_IMPL_FUNC && defined SPEKTRUM_BIND_PIN_PORT
145 RADIO_CONTROL_BIND_IMPL_FUNC();
253 #if USE_UDP0 || USE_UDP1 || USE_UDP2
262 INFO(
"PERIPHERALS_AUTO_INIT not enabled! Peripherals (including sys_time) need explicit initialization.")
arch independent ADC (Analog to Digital Converter) API
void mcu_arch_init(void)
Initialize the specific archittecture functions.
void adc_init(void)
Adc init.
void gpio_setup_output(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
void gpio_setup_input(ioportid_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as inputs.
static uint8_t gpio_get(ioportid_t port, uint16_t pin)
Get level of a gpio.
Some architecture independent helper functions for GPIOs.
void i2c_event(void)
i2c_event() function
void WEAK mcu_reboot(enum reboot_state_t reboot_state)
Reboot the MCU Should not be called during flight or ciritcal operations.
reboot_state_t
The requested reboot states.
void WEAK board_init(void)
Optional board init function called at the start of mcu_init().
void mcu_init(void)
Microcontroller peripherals initialization.
void WEAK mcu_energy_save(void)
Puts the MCU in energy save mode This disables features of the MCU to save energy.
void mcu_event(void)
MCU event functions.
void WEAK board_init2(void)
Optional board init function called at the end of mcu_init().
void spi_init_slaves(void)
spi_init_slaves() function
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
static void led_init(void)
Automatic initialization of actived LED Set to OFF at startup.
void uart_arch_init(void)
Arch independent mcu ( Micro Controller Unit ) utilities.
#define RADIO_CONTROL_POWER_ON
#define RADIO_CONTROL_POWER_PIN
#define RADIO_CONTROL_POWER_PORT
arch independent PIPE API
#define PERIPHERAL3V3_ENABLE_ON
#define PERIPHERAL3V3_ENABLE_PORT
#define PERIPHERAL3V3_ENABLE_PIN
arch independent Random Number Generator API
Platform-independent software I2C implementation.
Radio control spektrum interface.
Architecture independent SPI (Serial Peripheral Interface) API.
void VCOM_event(void)
Poll usb (required by libopencm3).
Architecture independent timing functions.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API