24 lines
346 B
C++
24 lines
346 B
C++
#ifndef DIGITAL_OUT_H
|
|
#define DIGITAL_OUT_H
|
|
|
|
#include<stdint.h>
|
|
#include <zephyr/drivers/gpio.h>
|
|
|
|
struct Digital_out {
|
|
enum : uint8_t {
|
|
STATUS_LED = 0
|
|
};
|
|
|
|
explicit Digital_out(uint8_t pin_id);
|
|
|
|
void init();
|
|
void toggle();
|
|
void set_hi();
|
|
void set_lo();
|
|
|
|
private:
|
|
const struct gpio_dt_spec *gpio;
|
|
};
|
|
|
|
#endif
|