added board_buttons for lpcxpresso/board_lpcxpresso1769.c

This commit is contained in:
hathach
2014-03-07 12:45:49 +07:00
parent 26b1b879dd
commit 3d17212f29
5 changed files with 118 additions and 51 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
}

View File

@@ -82,8 +82,8 @@
#define TUSB_CFG_DEVICE_FULLSPEED 1 // TODO refractor, remove
//------------- CLASS -------------//
#define TUSB_CFG_DEVICE_HID_KEYBOARD 0
#define TUSB_CFG_DEVICE_HID_MOUSE 1
#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
#define TUSB_CFG_DEVICE_HID_MOUSE 0
#define TUSB_CFG_DEVICE_HID_GENERIC 0
#define TUSB_CFG_DEVICE_MSC 0
#define TUSB_CFG_DEVICE_CDC 0