/** * \brief Main code entry point. */ int main( void ) { /* Prepare the hardware */ prvSetupHardware(); /* Usi initialization */ usi_init(); /* Initialize USI communication structure */ x_phy_serial_msg.uc_protocol_type = PROTOCOL_USER_DEFINED; while (1) { usi_process(); /* blink led 0 */ if (b_led_swap) { b_led_swap = false; #if (BOARD == SAM4CMP_DB || BOARD == SAM4CMS_DB) LED_Toggle(LED4); #else LED_Toggle(LED0); #endif } } }
/** * \brief Main code entry point. */ int main( void ) { #ifdef CONF_BOARD_LCD_EN status_code_t status; #endif /* count ms to blink led */ ul_count_ms = 500; /* Prepare the hardware */ prvSetupHardware(); /* UART debug */ configure_dbg_console(); puts(STRING_HEADER); #ifdef CONF_BOARD_LCD_EN /* Initialize the C42364A LCD glass component. */ status = c42364a_init(); if (status != STATUS_OK) { puts("-- LCD Initialization fails! --\r\n"); while (1) { } } c42364a_set_contrast(15); c42364a_clear_all(); c42364a_show_icon(C42364A_ICON_ATMEL); c42364a_show_icon(C42364A_ICON_USB); c42364a_show_text((const uint8_t *)"PHYSNF"); #endif /* Init process timers */ initTimer1ms(); /* Init Phy Layer */ phy_init(SNIFFER_IF_ENABLE); /* Init Usi Layer */ usi_init(); while (1) { /* blink led 0 */ if (b_led_swap) { b_led_swap = false; #if (BOARD == SAM4CMP_DB || BOARD == SAM4CMS_DB) LED_Toggle(LED4); #else LED_Toggle(LED0); #endif } /* updWatchDog (); */ /* sniffer serialization */ sniffer_if_process(); /* USI */ usi_process(); } }