94#include <driver/gpio.h>
95#include <driver/touch_pad.h>
100typedef enum __attribute__((packed))
123void initButtons(gpio_num_t* pushButtons, uint8_t numPushButtons, touch_pad_t* touchPads, uint8_t numTouchPads);
int getTouchJoystick(int32_t *phi, int32_t *r, int32_t *intensity)
Get high-level touch input, an analog input. NOTE: You must have touch callbacks enabled to use this.
Definition hdw-btn.c:464
buttonBit_t button
The button that caused this event.
Definition hdw-btn.h:119
buttonBit_t
Bitmask values for all the different buttons.
Definition hdw-btn.h:101
@ PB_UP
The up button's bit.
Definition hdw-btn.h:102
@ PB_SELECT
The select button's bit.
Definition hdw-btn.h:109
@ PB_DOWN
The down button's bit.
Definition hdw-btn.h:103
@ PB_START
The start button's bit.
Definition hdw-btn.h:108
@ PB_B
The B button's bit.
Definition hdw-btn.h:107
@ PB_LEFT
The left button's bit.
Definition hdw-btn.h:104
@ PB_RIGHT
The right button's bit.
Definition hdw-btn.h:105
@ PB_A
The A button's bit.
Definition hdw-btn.h:106
bool checkButtonQueue(buttonEvt_t *)
Service the queue of button events that caused interrupts This only returns a single event,...
Definition hdw-btn.c:111
void deinitButtons(void)
Free memory used by the buttons.
Definition hdw-btn.c:87
bool down
True if the button was pressed, false if it was released.
Definition hdw-btn.h:120
uint16_t state
A bitmask for the state of all buttons.
Definition hdw-btn.h:118
void initButtons(gpio_num_t *pushButtons, uint8_t numPushButtons, touch_pad_t *touchPads, uint8_t numTouchPads)
Initialize both pushbuttons and touch buttons.
Definition hdw-btn.c:75