コード例 #1
0
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
}
コード例 #2
0
void __platform_init()
{
    __cc430_mcu_init();
    __gpio_init();
    __uart_init();
    __led_init();

//    __hw_debug_init(); // TODO
}
コード例 #3
0
ファイル: console.c プロジェクト: AdriDlu/coreboot
void console_hw_init(void)
{
	__cbmemc_init();
	__spkmodem_init();
	__qemu_debugcon_init();

	__uart_init();
	__ne2k_init();
	__usbdebug_init();
	__spiconsole_init();
}
コード例 #4
0
ファイル: serial.c プロジェクト: fernandomorse/noduino-sdk
irom uart_t * __serial_begin(int uart_nr, unsigned long baud)
{
	_uart_nr = uart_nr;
    if(uart_get_debug() == _uart_nr) {
        uart_set_debug(UART_NO);
    }

    uart_t *_uart = __uart_init(_uart_nr, baud, SERIAL_8N1, SERIAL_FULL, 1);
    _peek_char = -1;
	return _uart;
}