19 lines
337 B
C
19 lines
337 B
C
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "esp_adc/adc_oneshot.h"
|
|
|
|
typedef enum {
|
|
INPUT_NONE = 0,
|
|
INPUT_UP,
|
|
INPUT_DOWN,
|
|
INPUT_LEFT,
|
|
INPUT_RIGHT,
|
|
INPUT_CENTER,
|
|
} input_event_t;
|
|
|
|
void input_init(void);
|
|
input_event_t input_poll(void);
|
|
esp_err_t input_read_raw(int *out_raw);
|
|
adc_channel_t input_get_channel(void);
|