void __platform_init()
{
    __gpio_init();
    __led_init();
    __ubutton_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_GDO2_PIN, true, gpioModeInput, 0);
    // hw_gpio_configure_pin(CC1101_SPI_PIN_CS, false, gpioModePushPull, 1);
#endif

#ifdef USE_SX127X
    // 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(SX127x_DIO0_PIN, true, gpioModeInput, 0);
    hw_gpio_configure_pin(SX127x_DIO1_PIN, true, gpioModeInput, 0);
#endif

    //__watchdog_init();

    /* Initialize NVRAM */


    /* Initialize NOR flash */
    blockdevice_init(permanent_blockdevice);
}
void __platform_post_framework_init()
{

#ifdef PLATFORM_USE_USB_CDC
    __usb_init_cdc();
#endif

    __ubutton_init();
    led_init();

}
void __platform_post_framework_init()
{
    __ubutton_init();

#ifdef PLATFORM_EFM32HG_STK3400_LCD_ENABLED
    uint64_t id = hw_get_unique_id();
    // nano spec of newlib does not support 64bit ...
    lcd_write_string("%.8x", (uint32_t)(id >> 32));
    lcd_write_string("%.8x", (uint32_t)id);
#endif
}
void __platform_post_framework_init()
{
    __ubutton_init();

#ifdef PLATFORM_USE_USB_CDC
    __usb_init_cdc();
#endif

#ifdef PLATFORM_USE_SWO
    SWO_SetupForPrint();
#endif
}
void __platform_post_framework_init()
{
    __ubutton_init();
}