From 8457d0d14cb79174d537c2cd210c0dea3c997358 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 1 Apr 2019 18:31:20 +0700 Subject: add board_button_read() --- examples/device/cdc_msc_hid/ses/samd21/samd21.emProject | 5 +++++ examples/device/cdc_msc_hid/src/main.c | 2 +- examples/device/cdc_msc_hid_freertos/src/main.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject b/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject index e65873008..30aad55ca 100644 --- a/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject +++ b/examples/device/cdc_msc_hid/ses/samd21/samd21.emProject @@ -67,6 +67,11 @@ + + + + + diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c index a203e567e..12e331af7 100644 --- a/examples/device/cdc_msc_hid/src/main.c +++ b/examples/device/cdc_msc_hid/src/main.c @@ -135,7 +135,7 @@ void usb_hid_task(void) if ( board_millis() < start_ms + interval_ms) return; // not enough time start_ms += interval_ms; - uint32_t const btn = board_buttons(); + uint32_t const btn = board_button_read(); if ( tud_suspended() && btn ) { diff --git a/examples/device/cdc_msc_hid_freertos/src/main.c b/examples/device/cdc_msc_hid_freertos/src/main.c index 388bd9ad1..e47937bd5 100644 --- a/examples/device/cdc_msc_hid_freertos/src/main.c +++ b/examples/device/cdc_msc_hid_freertos/src/main.c @@ -158,7 +158,7 @@ void usb_hid_task(void* params) if ( board_millis() < start_ms + interval_ms) return; // not enough time start_ms += interval_ms; - uint32_t const btn = board_buttons(); + uint32_t const btn = board_button_read(); /*------------- Keyboard -------------*/ if ( tud_hid_keyboard_ready() ) -- cgit v1.3.1