Macros | Typedefs | Functions | Variables
button-hal.h File Reference

Header file for the button HAL. More...

#include "contiki.h"
#include "dev/gpio-hal.h"
#include "sys/clock.h"
#include "sys/ctimer.h"
#include <stdint.h>
#include <stdbool.h>
#include <string.h>

Go to the source code of this file.


 Controls the software debounce timer duration. More...
 Controls whether buttons will have human-readable names. More...
 Number of different ports that buttons are connected to. More...
 Optional button IDs.
#define BUTTON_HAL_GET_DESCRIPTION(b)   (b)->description
 Retrieve the textual description of a button. More...


typedef struct button_hal_button_s button_hal_button_t
 A logical representation of a user button.


void button_hal_init (void)
 Initialise the button HAL.
button_hal_button_tbutton_hal_get_by_id (uint8_t unique_id)
 Retrieve a button by ID. More...
button_hal_button_tbutton_hal_get_by_index (uint8_t index)
 Retrieve a button by its index. More...
uint8_t button_hal_get_state (button_hal_button_t *button)
 Get the state of a button (pressed / released) More...


const uint8_t button_hal_button_count
 The number of buttons on a device.
process_event_t button_hal_press_event
 A broadcast event generated when a button gets pressed.
process_event_t button_hal_release_event
 A broadcast event generated when a button gets released.
process_event_t button_hal_periodic_event
 A broadcast event generated every second while a button is kept pressed.

Detailed Description

Header file for the button HAL.

Definition in file button-hal.h.