/*! \brief Main function. Execution starts here. */ int main(void) { /* System clock is initialized. */ sysclk_init(); /* Board related init such as SPI and GPIO. */ board_init(); /* IRQs init. */ irq_initialize_vectors(); /* Transceiver init. */ if (at86rfx_init() != AT86RFX_SUCCESS) { Assert("Transceiver initialization failed" == 0); } /* Interrupt enabled before USB init as it uses IRQ for enumeration. */ cpu_irq_enable(); /* Start USB stack */ udc_start(); /* Continuous looping of available tasks, starts here. */ while (true) { usb_task(); app_task(); at86rfx_task(); } }
/** * \brief Run Wireless Module unit tests * * Initializes the clock system, board and USB. * Then runs the wireless task continuously. */ int main(void) { // Initialize the board and all the peripheral required sysclk_init(); board_init(); // Initialize interrupt vector table support. irq_initialize_vectors(); // Enable interrupts cpu_irq_enable(); // Enable interrupts stdio_usb_init(); while (1) { at86rfx_task(); }; }