/** \brief The program starts executing here. */ int mote_main(void) { board_init(); leds_error_on(); debugpins_frame_set(); some_delay(); debugpins_frame_toggle(); some_delay(); debugpins_frame_toggle(); some_delay(); debugpins_frame_clr(); some_delay(); debugpins_slot_set(); some_delay(); debugpins_slot_toggle(); some_delay(); debugpins_slot_toggle(); some_delay(); debugpins_slot_clr(); some_delay(); debugpins_fsm_set(); some_delay(); debugpins_fsm_toggle(); some_delay(); debugpins_fsm_toggle(); some_delay(); debugpins_fsm_clr(); some_delay(); debugpins_task_set(); some_delay(); debugpins_task_toggle(); some_delay(); debugpins_task_toggle(); some_delay(); debugpins_task_clr(); some_delay(); debugpins_isr_set(); some_delay(); debugpins_isr_toggle(); some_delay(); debugpins_isr_toggle(); some_delay(); debugpins_isr_clr(); some_delay(); debugpins_radio_set(); some_delay(); debugpins_radio_toggle(); some_delay(); debugpins_radio_toggle(); some_delay(); debugpins_radio_clr(); some_delay(); board_reset(); return 0; }
void bsp_timer_cb_compare(void) { // toggle pin debugpins_frame_toggle(); // toggle error led leds_sync_toggle(); // increment counter app_dbg.bsp_timer_num_compare++; // schedule again bsp_timer_scheduleIn(BSP_TIMER_PERIOD); }
/** \brief The program starts executing here. */ int mote_main(void) { uint16_t delay; board_init(); while (1) { for (delay=0xffff;delay>0;delay--); debugpins_frame_toggle(); debugpins_slot_toggle(); debugpins_fsm_toggle(); debugpins_task_toggle(); debugpins_isr_toggle(); debugpins_radio_toggle(); } }
void radiotimer_cb_overflow() { uint16_t delay; // toggle pin debugpins_frame_toggle(); // switch radio LED on leds_radio_toggle(); // increment debug counter app_dbg.radiotimer_num_overflow++; // wait a bit for (delay=0;delay<ISR_DELAY;delay++); }
void cb_overflow(void) { // toggle pin debugpins_frame_toggle(); // switch radio LED on leds_error_toggle(); // reset the counter for number of remaining compares app_vars.num_compares_left = RADIOTIMER_NUM_COMPARES; app_vars.last_compare_val = RADIOTIMER_COMPARE_PERIOD; radiotimer_schedule(app_vars.last_compare_val); // increment debug counter app_dbg.num_overflow++; }