9 #include <satcat5/cfg_i2c.h>
10 #include <satcat5/cfg_spi.h>
42 u8 devidx,
const u8* wrdata, u8 rwbytes,
48 u8 devidx,
const u8* wrdata, u8 wrbytes, u8 rdbytes,
55 u32 regaddr,
unsigned nread,
const u8* rdata)
override;
58 bool execute(u8 devidx,
const u8* wrdata, u8 rwbytes, u8 skip);
Callback interface for cfg::I2cGeneric events.
Polymorphic API for a generic I2C interface.
SPI Event Handler callback for use with SpiGeneric.
Polymorphic API for a generic SPI interface.
Device driver for the NXP SC18IS602B I2C-to-SPI bridge.
bool exchange(u8 devidx, const u8 *wrdata, u8 rwbytes, satcat5::cfg::SpiEventListener *callback=0) override
Queue a read-and-write SPI bus transaction.
bool configure(unsigned spi_mode)
Configure the SPI mode (0/1/2/3 sets CPOL, CPHA)
Sc18is602(satcat5::cfg::I2cGeneric *i2c, const satcat5::util::I2cAddr &devaddr)
Constructor links to specified control register.
bool query(u8 devidx, const u8 *wrdata, u8 wrbytes, u8 rdbytes, satcat5::cfg::SpiEventListener *callback=0) override
Queue a write-then-read SPI bus transaction.
bool busy() override
Is the SPI controller currently busy?
Conversion function for I2C device addresses.