30 : slave(bus, cs, spiConfig), resRange(resistance)
38 if (resistance >
static_cast<uint32_t
>(resRange))
41 uint8_t value = resistance /
static_cast<float>(resRange) * 255;
43 spi.
write(
static_cast<uint16_t
>(
static_cast<uint16_t
>(channel) | value));
AD5204(SPIBusInterface &bus, miosix::GpioPin cs, SPIBusConfig spiConfig, Resistance resistance=Resistance::R_10)
void setResistance(Channel channel, uint32_t resistance)
Interface for low level access of a SPI bus as a master.
Provides high-level access to the SPI Bus for a single transaction.
void write(uint8_t data)
Writes a single byte to the bus.
This file includes all the types the logdecoder script will decode.
SPI Bus configuration for a specific slave.