Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Revision 50:d788c5ff95db, committed 2014-07-23
- Comitter:
- Rohit Grover
- Date:
- Wed Jul 23 12:00:34 2014 +0100
- Parent:
- 49:c941433e0eb0
- Child:
- 51:63ba3bcf5cd6
- Commit message:
- remove include of nrf.h from app_button.h
Changed in this revision
| nordic/nrf-sdk/app_common/app_button.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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 */
