void lcd_enable(bool enable) { if (enable) __lcd_init(); else SegmentLCD_Disable(); }
void __platform_init() { __efm32hg_mcu_init(); __gpio_init(); __led_init(); __lcd_init(); #ifdef PLATFORM_USE_USB_CDC __usb_init_cdc(); #endif #if defined(FRAMEWORK_LOG_ENABLED) || defined(FRAMEWORK_SHELL_ENABLED) // framework does not need console, if app needs it app should init this console_init(); #endif #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); // TODO pull up or pull down to prevent floating // hw_gpio_configure_pin(CC1101_SPI_PIN_CS, false, gpioModePushPull, 1); //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(); error_t err; err = hw_gpio_configure_pin(BUTTON0, true, gpioModeInput, 0); assert(err == SUCCESS); // TODO pull up or pull down to prevent floating err = hw_gpio_configure_pin(BUTTON1, true, gpioModeInput, 0); assert(err == SUCCESS); // TODO pull up or pull down to prevent floating // TODO: only for cc430? // __watchdog_init(); // TODO configure from cmake? }
void __platform_init() { __efm32hg_mcu_init(); __gpio_init(); __uart_init(); __led_init(); __lcd_init(); #ifdef PLATFORM_USE_USB_CDC __usb_init_cdc(); #endif #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(); error_t err; err = hw_gpio_configure_pin(BUTTON0, true, gpioModeInput, 0); assert(err == SUCCESS); // TODO pull up or pull down to prevent floating err = hw_gpio_configure_pin(BUTTON1, true, gpioModeInput, 0); assert(err == SUCCESS); // TODO pull up or pull down to prevent floating }
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? }