upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
Go to the source code of this file.
Data Structures | |
struct | _ttp223_context |
Functions | |
ttp223_context | ttp223_init (int pin) |
void | ttp223_close (ttp223_context dev) |
upm_result_t | ttp223_is_pressed (ttp223_context dev, bool *value) |
upm_result_t | ttp223_install_isr (ttp223_context dev, mraa_gpio_edge_t edge_level, void(*isr)(void *), void *arg) |
upm_result_t | ttp223_uninstall_isr (ttp223_context dev) |
Typedefs | |
typedef struct _ttp223_context * | ttp223_context |
ttp223_context ttp223_init | ( | int | pin | ) |
Sensor Init function
pin | The pin number the sensor is attached to |
void ttp223_close | ( | ttp223_context | dev | ) |
Sensor Module close function
dev | pointer to the sensor struct |
upm_result_t ttp223_is_pressed | ( | ttp223_context | dev, |
bool * | value | ||
) |
Function to tell if the sensor is pressed
dev | pointer to the sensor struct |
value | pointer to store whether the sensor is pressed or not |
upm_result_t ttp223_install_isr | ( | ttp223_context | dev, |
mraa_gpio_edge_t | edge_level, | ||
void(*)(void *) | isr, | ||
void * | arg | ||
) |
Installs an interrupt service routine (ISR) to be called when the button is activated or deactivated.
dev | pointer to the sensor struct |
edge_level | one of mraa_gpio_edge_t values |
isr | pointer to a function to be called on interrupt |
arg | pointer to an object to be supplied as an argument to the ISR. |
upm_result_t ttp223_uninstall_isr | ( | ttp223_context | dev | ) |
Uninstall a previously installed interrupt handler
dev | pointer to the sensor struct |
typedef struct _ttp223_context * ttp223_context |
device context