#include <software_i2c.h>
template<typename SDA, typename SCL, unsigned stretchTimeout = 50>
class miosix::SoftwareI2C< SDA, SCL, stretchTimeout >
Software I2C class.
- Parameters
-
SDA | SDA gpio pin. Pass a Gpio<P,N> class |
SCL | SCL gpio pin. Pass a Gpio<P,N> class |
timeout | for clock stretching, in milliseconds |
template<typename SDA , typename SCL , unsigned stretchTimeout>
Initializes the SPI software peripheral
template<typename SDA , typename SCL , unsigned stretchTimeout>
Receive a byte from a device. Always acknowledges back.
- Returns
- the received byte
template<typename SDA , typename SCL , unsigned stretchTimeout>
Receive a byte from a device. Never acknowledges back.
- Returns
- the received byte
template<typename SDA , typename SCL , unsigned stretchTimeout>
Send a byte to a device.
- Parameters
-
- Returns
- true if the device acknowledged the byte
template<typename SDA , typename SCL , unsigned stretchTimeout>
template<typename SDA , typename SCL , unsigned stretchTimeout>
The documentation for this class was generated from the following file: