テスト用
Fork of nRF51822 by
Diff: nordic/nrf-sdk/app_common/app_button.h
- Revision:
- 50:d788c5ff95db
- Parent:
- 37:c29c330d942c
- Child:
- 65:98215c4f3a25
--- a/nordic/nrf-sdk/app_common/app_button.h Wed Jul 23 11:59:36 2014 +0100 +++ b/nordic/nrf-sdk/app_common/app_button.h Wed Jul 23 12:00:34 2014 +0100 @@ -40,7 +40,6 @@ #include <stdint.h> #include <stdbool.h> -#include "nrf.h" #include "app_error.h" #include "app_scheduler.h" #include "nrf_gpio.h" @@ -98,7 +97,7 @@ (USE_SCHEDULER) ? app_button_evt_schedule : NULL); \ APP_ERROR_CHECK(ERR_CODE); \ } while (0) - + /**@brief Function for initializing the Buttons. * * @details This function will initialize the specified pins as buttons, and configure the Button @@ -107,7 +106,7 @@ * @note Normally initialization should be done using the APP_BUTTON_INIT() macro, as that will take * care of connecting the Buttons module to the scheduler (if specified). * - * @note app_button_enable() function must be called in order to enable the button detection. + * @note app_button_enable() function must be called in order to enable the button detection. * * @param[in] p_buttons Array of buttons to be used (NOTE: Must be static!). * @param[in] button_count Number of buttons. @@ -164,7 +163,7 @@ static __INLINE void app_button_evt_get(void * p_event_data, uint16_t event_size) { app_button_event_t * p_buttons_event = (app_button_event_t *)p_event_data; - + APP_ERROR_CHECK_BOOL(event_size == sizeof(app_button_event_t)); p_buttons_event->button_handler(p_buttons_event->pin_no, p_buttons_event->button_action); } @@ -174,11 +173,11 @@ uint8_t button_action) { app_button_event_t buttons_event; - + buttons_event.button_handler = button_handler; buttons_event.pin_no = pin_no; buttons_event.button_action = button_action; - + return app_sched_event_put(&buttons_event, sizeof(buttons_event), app_button_evt_get); } /**@endcond */