19 #ifndef MINLIB_65db7f3d_c57e_4420_884f_350c78711f41_H_
20 #define MINLIB_65db7f3d_c57e_4420_884f_350c78711f41_H_
24 #include <freertos/FreeRTOS.h>
25 #include <freertos/task.h>
26 #include <driver/gpio.h>
27 #include <sdkconfig.h>
34 Input = GPIO_MODE_INPUT,
36 InOut = GPIO_MODE_INPUT_OUTPUT;
44 template <
int TPin,
bool TLevel = false, pin_direction TDirection = pin_direction::Output>
48 gpio_pad_select_gpio(TPin);
49 gpio_set_level(TPin, TLevel ? 1 : 0);
50 gpio_set_direction(TPin, TDirection);
53 gpio_set_level(TPin, on ? 1 : 0);
59 return gpio_get_level(TPin) == 1;
62 gpio_set_direction(TPin, direction);
68 template <
int TPin,
bool TLevel = false, pin_direction TDirection = pin_direction::Output>
Definition: mn_pin.hpp:45
basic_esp32_hardware_pin()
Definition: mn_pin.hpp:47
bool get()
Definition: mn_pin.hpp:58
void reset()
Definition: mn_pin.hpp:55
void set(bool on)
Definition: mn_pin.hpp:52
void set_direction(pin_direction &direction)
Definition: mn_pin.hpp:61
Definition: mn_pin.hpp:40
Definition: mn_allocator_typetraits.hpp:25
pin_direction
Definition: mn_pin.hpp:32
basic_esp32_hardware_pin< TPin > esp32_digital_pin
Definition: mn_pin.hpp:69