First
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
|
||||
|
||||
class Buttons {
|
||||
public:
|
||||
|
||||
enum Buttons_e {
|
||||
BUTTON1,
|
||||
BUTTON2,
|
||||
NR_BUTTONS,
|
||||
};
|
||||
|
||||
Buttons();
|
||||
~Buttons();
|
||||
int buttons_init();
|
||||
static void buttons_cb(const struct device *dev, struct gpio_callback *cb, uint32_t pins);
|
||||
static void debounce_cb(struct k_work *work);
|
||||
|
||||
private:
|
||||
static const struct gpio_dt_spec buttons[NR_BUTTONS];
|
||||
static struct gpio_callback buttons_cb_data[NR_BUTTONS];
|
||||
};
|
||||
Reference in New Issue
Block a user