Nýjir kóðar og uppfærðir gamlir kóðar fyrir arduino yfir í zephyr

This commit is contained in:
2026-10-08 15:18:32 +00:00
parent 53091f68df
commit c2d8780478
24 changed files with 922 additions and 338 deletions
+12 -4
View File
@@ -1,14 +1,22 @@
#ifndef DIGITAL_IN_H
#define DIGITAL_IN_H
#include <stdint.h>
#include <zephyr/drivers/gpio.h>
struct Digital_in {
uint8_t pin_mask;
enum : uint8_t {
ENCODER_C1 = 0,
ENCODER_C2 = 1
};
const struct gpio_dt_spec *gpio;
explicit Digital_in(uint8_t pin_id);
Digital_in(uint8_t pin);
void init();
bool is_hi();
bool is_lo();
};
#endif
#endif