7 #define LOG_PIN(prefix, pin) \ 8 if ((pin) != nullptr) { \ 9 ESP_LOGCONFIG(TAG, prefix "%s", (pin)->dump_summary().c_str()); \ 34 return static_cast<Flags>(
static_cast<uint8_t
>(lhs) & static_cast<uint8_t>(rhs));
37 return static_cast<Flags>(
static_cast<uint8_t
>(lhs) | static_cast<uint8_t>(rhs));
52 virtual void setup() = 0;
56 virtual bool digital_read() = 0;
58 virtual void digital_write(
bool value) = 0;
60 virtual std::string dump_summary()
const = 0;
89 void digital_write(
bool value);
90 void clear_interrupt();
100 this->attach_interrupt(
reinterpret_cast<void (*)(
void *)
>(func), arg, type);
103 virtual void detach_interrupt()
const = 0;
107 virtual uint8_t get_pin()
const = 0;
111 virtual bool is_inverted()
const = 0;
constexpr FlagsHelper operator|(Flags lhs, Flags rhs)
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
constexpr FlagsHelper operator &(Flags lhs, Flags rhs)
bool digital_read() override
virtual bool is_internal()
void pin_mode(gpio::Flags _) override
A pin to replace those that don't exist.
std::string dump_summary() const override
void digital_write(bool _) override
Implementation of SPI Controller mode.
bool is_internal() override
constexpr FlagsHelper(Flags val)
void attach_interrupt(void(*func)(T *), T *arg, gpio::InterruptType type) const
ISRInternalGPIOPin(void *arg)