ported board_buttons API to EA4357 but device is not mounted yet

This commit is contained in:
hathach
2014-03-07 15:31:41 +07:00
parent 01760794fe
commit e506f4cae2
5 changed files with 125 additions and 45 deletions

View File

@@ -133,6 +133,12 @@ OSAL_TASK_FUNCTION( led_blinking_task ) (void* p_task_para)
board_leds(led_on_mask, 1 - led_on_mask);
led_on_mask = 1 - led_on_mask; // toggle
uint32_t btn_mask = board_buttons();
for(uint8_t i=0; i<32; i++)
{
if ( BIT_TEST_(btn_mask, i) ) printf("button %d is pressed\n", i);
}
OSAL_TASK_LOOP_END
}