6#ifndef IOA_PLATFORMDETERMINATIONWIRE_H
7#define IOA_PLATFORMDETERMINATIONWIRE_H
9#include "PlatformDetermination.h"
10#include <SimpleSpinLock.h>
18void ioaWireBegin(I2C* pI2cToUse);
19# define IOA_USE_MBED_WIRE
20#elif defined(IOA_USE_AVR_TWI_DIRECT) && defined(__AVR__) && defined(IOA_DEVELOPMENT_EXPERIMENTAL)
22typedef AvrTwiManager* WireType;
23extern WireType AvrTwi;
25#elif defined(BUILD_FOR_PICO_CMAKE)
26#define IOA_USE_PICOSDK_I2C
27#include "pico/i2cWrapper.h"
29typedef PicoI2cWrapper* WireType;
30void ioaWireBegin(i2c_inst_t* toUse);
32# define IOA_USE_ARDUINO_WIRE
34typedef TwoWire* WireType;
38extern WireType defaultWireTypePtr;
47bool ioaWireRead(WireType wire,
int address, uint8_t* buffer,
size_t len);
61bool ioaWireWriteWithRetry(WireType pI2c,
int address,
const uint8_t* buffer,
size_t len,
int retriesAllowed = 0,
bool sendStop =
true);
68void ioaWireSetSpeed(WireType pI2c,
long frequency);
75bool ioaWireReady(WireType wire,
int address);
81extern SimpleSpinLock i2cLock;