6 #ifndef _IO_ABSTRACTION_CORE_TYPES
7 #define _IO_ABSTRACTION_CORE_TYPES
13 #include "PlatformDetermination.h"
14 #include <TaskManagerIO.h>
16 #define IO_PIN_NOT_DEFINED 0xFF
18 #if defined(IOA_USE_MBED)
19 # include "mbed/MbedDigitalIO.h"
20 #elif defined(ESP32) && defined(IOA_USE_ESP32_EXTRAS)
21 # include "esp32/ESP32DigitalIO.h"
22 #elif defined(BUILD_FOR_PICO_CMAKE)
23 # include "pico/PicoDigitalIO.h"
41 BtreeList<uint32_t, GpioWrapper> pinCache;
43 GpioWrapper *allocatePinIfNeedBe(uint8_t pinToAlloc);
141 virtual void attachInterrupt(pinid_t pin, RawIntHandler interruptHandler, uint8_t mode);
176 #define pgm_read_byte_near(x) (*(x))
177 #elif defined(IOA_USE_ARDUINO)
178 #define ioUsingArduino internalDigitalIo
195 #define internalDigitalDevice() internalIoAbstraction
323 #define asIoRef(x) (&(x))
uint8_t ioDeviceDigitalReadPort(IoAbstractionRef ioDev, pinid_t pinOnPort)
Definition: BasicIoAbstraction.h:321
bool ioDeviceDigitalWriteS(IoAbstractionRef ioDev, pinid_t pin, uint8_t val)
Definition: BasicIoAbstraction.h:266
void ioDeviceDigitalWrite(IoAbstractionRef ioDev, pinid_t pin, uint8_t val)
Definition: BasicIoAbstraction.h:225
uint8_t ioDeviceDigitalRead(IoAbstractionRef ioDev, pinid_t pin)
Definition: BasicIoAbstraction.h:214
void ioDevicePinMode(IoAbstractionRef ioDev, pinid_t pin, uint8_t dir)
Definition: BasicIoAbstraction.h:204
IoAbstractionRef internalDigitalIo()
bool ioDeviceDigitalWritePortS(IoAbstractionRef ioDev, pinid_t pinOnPort, uint8_t portVal)
Definition: BasicIoAbstraction.h:280
bool ioDeviceSync(IoAbstractionRef ioDev)
Definition: BasicIoAbstraction.h:233
uint8_t ioDeviceDigitalReadPortS(IoAbstractionRef ioDev, pinid_t pinOnPort)
Definition: BasicIoAbstraction.h:294
BasicIoAbstraction * IoAbstractionRef
Definition: BasicIoAbstraction.h:170
void ioDeviceAttachInterrupt(IoAbstractionRef ioDev, pinid_t pin, RawIntHandler intHandler, uint8_t mode)
Definition: BasicIoAbstraction.h:245
void ioDeviceDigitalWritePort(IoAbstractionRef ioDev, pinid_t pinOnPort, uint8_t portVal)
Definition: BasicIoAbstraction.h:307
uint8_t ioDeviceDigitalReadS(IoAbstractionRef ioDev, pinid_t pin)
Definition: BasicIoAbstraction.h:255
Definition: BasicIoAbstraction.h:38
void writePortS(pinid_t p, uint8_t v)
Definition: BasicIoAbstraction.h:88
uint8_t digitalReadS(pinid_t p)
Definition: BasicIoAbstraction.h:70
virtual void pinDirection(pinid_t pin, uint8_t mode)
virtual void writePort(pinid_t pin, uint8_t portVal)
void pinMode(pinid_t pin, uint8_t mode)
Definition: BasicIoAbstraction.h:104
void digitalWriteS(pinid_t p, uint8_t v)
Definition: BasicIoAbstraction.h:80
virtual uint8_t readValue(pinid_t pin)
void digitalWrite(pinid_t p, uint8_t v)
Definition: BasicIoAbstraction.h:63
uint8_t digitalRead(pinid_t p)
Definition: BasicIoAbstraction.h:54
virtual void writeValue(pinid_t pin, uint8_t value)
uint8_t readPortS(pinid_t p)
Definition: BasicIoAbstraction.h:96
virtual void attachInterrupt(pinid_t pin, RawIntHandler interruptHandler, uint8_t mode)
virtual bool runLoop()
Definition: BasicIoAbstraction.h:147
bool sync()
Definition: BasicIoAbstraction.h:112
virtual uint8_t readPort(pinid_t pin)