/************************************************************************* * Description: Toggle the state of the LED * Returns: none * Notes: none *************************************************************************/ void led_tx_toggle( void) { if (led_tx_state()) { led_tx_off(); } else { led_tx_on(); } }
/************************************************************************* * Description: Task for blinking LED * Returns: none * Notes: none *************************************************************************/ void led_task( void) { if (timer_interval_expired(&Off_Delay_Timer_Rx)) { timer_interval_no_expire(&Off_Delay_Timer_Rx); led_rx_off(); } if (timer_interval_expired(&Off_Delay_Timer_Tx)) { timer_interval_no_expire(&Off_Delay_Timer_Tx); led_tx_off(); } }
int main(void) { watchdog_init(); clock_init(); gpio_init(); led_init(); uart_init(); while (1) { led_tx_off(); led_rx_on(); sdelay(10000000); led_tx_on(); led_rx_off(); sdelay(10000000); uart_putchar('z'); } return 0; }