Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Public Member Functions | |
SPISoft (uint16_t miso, uint16_t mosi, uint16_t sck, uint8_t delay) | |
virtual void | begin () |
begin(): Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More... | |
virtual void | end () |
end(): Disables the SPI bus (leaving pin modes unchanged). More... | |
virtual void | beginTransaction (SPISettings mySettings) |
beginTransaction(): Initializes the SPI bus using the defined SPISettings. More... | |
virtual void | endTransaction () |
endTransaction(): Stop using the SPI bus. Normally this is called after de-asserting the chip select, to allow other libraries to use the SPI bus. More... | |
void | transfer (uint8 *buffer, size_t size) |
unsigned char | transfer (unsigned char val) |
transfer(), transfer16() More... | |
unsigned short | transfer16 (unsigned short val) |
void | setDelay (uint8_t dly) |
Set microsecond delay for the SCK signal. Impacts SPI speed. More... | |
Public Attributes | |
SPISettings | SPIDefaultSettings |
|
virtual |
|
inlinevirtual |
beginTransaction(): Initializes the SPI bus using the defined SPISettings.
Implements SPIBase.
|
inlinevirtual |
|
inlinevirtual |
endTransaction(): Stop using the SPI bus. Normally this is called after de-asserting the chip select, to allow other libraries to use the SPI bus.
Implements SPIBase.
|
inline |
Set microsecond delay for the SCK signal. Impacts SPI speed.
|
inlinevirtual |
transfer(), transfer16()
SPI transfer is based on a simultaneous send and receive: the received data is returned in receivedVal (or receivedVal16). In case of buffer transfers the received data is stored in the buffer in-place (the old data is replaced with the data received).
receivedVal = SPI.transfer(val) receivedVal16 = SPI.transfer16(val16) SPI.transfer(buffer, size)
Implements SPIBase.