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) | |
void | begin () override |
begin(): Initializes the SPI bus by setting SCK, MOSI, and SS to outputs, pulling SCK and MOSI low, and SS high. More... | |
void | end () override |
end(): Disables the SPI bus (leaving pin modes unchanged). More... | |
void | beginTransaction (SPISettings mySettings) override |
beginTransaction(): Initializes the SPI bus using the defined SPISettings. More... | |
void | endTransaction () override |
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) override |
unsigned char | transfer (unsigned char val) override |
transfer(), transfer16() More... | |
unsigned short | transfer16 (unsigned short val) override |
void | setDelay (uint8_t dly) |
Set microsecond delay for the SCK signal. Impacts SPI speed. More... | |
Public Attributes | |
SPISettings | SPIDefaultSettings |
Default settings used by the SPI bus until reset by beginTransaction(SPISettings) More... | |
|
overridevirtual |
|
inlineoverridevirtual |
beginTransaction(): Initializes the SPI bus using the defined SPISettings.
Implements SPIBase.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
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.
|
inlineoverridevirtual |
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.