Contiki-NG
|
Driver for nRF52 DK buttons. More...
#include <stdint.h>
#include "nordic_common.h"
#include "nrf_drv_gpiote.h"
#include "nrf_assert.h"
#include "boards.h"
#include "contiki.h"
#include "lib/sensors.h"
#include "button-sensor.h"
Go to the source code of this file.
Macros | |
#define | DEBOUNCE_DURATION (CLOCK_SECOND >> 5) |
Delay before button state is assumed to be stable. | |
Functions | |
static void | gpiote_event_handler (nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) |
Button toggle handler. More... | |
static int | config (int type, int c, nrf_drv_gpiote_pin_t pin) |
Configuration function for the button sensor for all buttons. More... | |
static int | config_button_1 (int type, int value) |
Configuration function for button 1. More... | |
static int | config_button_2 (int type, int value) |
Configuration function for button 2. More... | |
static int | config_button_3 (int type, int value) |
Configuration function for button 3. More... | |
static int | config_button_4 (int type, int value) |
Configuration function for button 4. More... | |
static int | value (int type, nrf_drv_gpiote_pin_t pin) |
Return current state of a button. More... | |
static int | value_button_1 (int type) |
Return current state of a button 1. More... | |
static int | value_button_2 (int type) |
Return current state of a button 2. More... | |
static int | value_button_3 (int type) |
Return current state of a button 3. More... | |
static int | value_button_4 (int type) |
Return current state of a button 4. More... | |
static int | status (int type, nrf_drv_gpiote_pin_t pin) |
Get status of a given button. More... | |
static int | status_button_1 (int type) |
Status function for button 1. More... | |
static int | status_button_2 (int type) |
Status function for button 2. More... | |
static int | status_button_3 (int type) |
Status function for button 3. More... | |
static int | status_button_4 (int type) |
Status function for button 3. More... | |
Driver for nRF52 DK buttons.
Definition in file button-sensor.c.