7 typedef struct mt_gpio_dev_t {
15 #define GPIO_CONSUMER "mtgpio"
17 #define GPIO_ACTIVE_LOW 1
19 #define ADV_GPIO_PINS \
43 const mt_gpio_dev_t pins[GPIO_COUNT] = ADV_GPIO_PINS;
45 typedef struct ev_io_gpio {
51 typedef struct mt_gpio_t {
52 ev_io_gpio w[GPIO_COUNT];
53 struct gpiod_chip *chip[GPIO_COUNT];
56 int mt_gpio_init(mt_gpio_t *self, struct ev_loop *loop, int fd);
58 void mt_gpio_deinit(mt_gpio_t *self);