void __platform_init() { __ezr32lg_mcu_init(); __gpio_init(); __led_init(); __hw_debug_init(); __watchdog_init(); // TODO configure from cmake? }
int main() { //initialise the platform itself __platform_init(); //do not initialise the scheduler, this is done by __framework_bootstrap() __framework_bootstrap(); //initialise platform functionality that depends on the framework __platform_post_framework_init(); __watchdog_init(); scheduler_run(); return 0; }
void __platform_init() { __gpio_init(); console_init(); __led_init(); #ifdef USE_CC1101 // configure the interrupt pins here, since hw_gpio_configure_pin() is MCU // specific and not part of the common HAL API hw_gpio_configure_pin(CC1101_GDO0_PIN, true, gpioModeInput, 0); // hw_gpio_configure_pin(CC1101_SPI_PIN_CS, false, gpioModePushPull, 1); #endif __watchdog_init(); }
void __platform_init() { __ezr32lg_mcu_init(); __gpio_init(); __led_init(); __lcd_init(); //#ifdef USE_CC1101 //TODO: add calls to hw_gpio_configure_pin for the pins used by the CC1101 driver //(and possibly the spi interface) // configure the interrupt pins here, since hw_gpio_configure_pin() is MCU specific and not part of the common HAL API //hw_gpio_configure_pin(CC1101_GDO0_PIN, true, gpioModeInput, 0); // TODO pull up or pull down to prevent floating //hw_gpio_configure_pin(CC1101_GDO2_PIN, true, gpioModeInput, 0) // TODO pull up or pull down to prevent floating // TODO not used for now //#endif __hw_debug_init(); __watchdog_init(); // TODO configure from cmake? }