Public Member Functions |
Public Attributes |
Protected Member Functions |
Protected Attributes |
List of all members
HSPI::Device Class Referenceabstract
Manages a specific SPI device instance attached to a controller. More...
#include <Device.h>
Inheritance diagram for HSPI::Device:
Collaboration diagram for HSPI::Device:
Public Member Functions | |
| Device (Controller &controller) | |
| virtual | ~Device () |
| bool | begin (PinSet pinSet, uint8_t chipSelect, uint32_t clockSpeed) |
| Register device with controller and prepare for action. More... | |
| void | end () |
| bool | isReady () const |
| Determine if the device is initialised. More... | |
| PinSet | getPinSet () const |
| uint8_t | getChipSelect () const |
| uint32_t | getSpeed () const |
| void | setBitOrder (BitOrder bitOrder) |
| BitOrder | getBitOrder () const |
| void | setClockMode (ClockMode mode) |
| ClockMode | getClockMode () const |
| virtual IoModes | getSupportedIoModes () const =0 |
| Return set of IO modes supported by a device implementation. More... | |
| bool | isSupported (IoMode mode) const |
Determine if the device/controller combination supports an IO mode Must be called after begin() as other settings (e.g. pinset) can affect support. More... | |
| virtual bool | setIoMode (IoMode mode) |
| IoMode | getIoMode () const |
| size_t | getBitsPerClock () const |
| void | execute (Request &request) |
| void | onTransfer (Callback callback) |
| Set a callback to be invoked before a request is started, and when it has finished. More... | |
| void | wait (Request &request) |
Public Attributes | |
| Controller & | controller |
Protected Member Functions | |
| void | transferStarting (Request &request) |
| bool | transferComplete (Request &request) |
Protected Attributes | |
| friend | Controller |
Detailed Description
Manages a specific SPI device instance attached to a controller.
Constructor & Destructor Documentation
◆ Device()
|
inline |
◆ ~Device()
|
inlinevirtual |
Member Function Documentation
◆ begin()
Register device with controller and prepare for action.
- Parameters
-
pinSet Use PinSet::normal for Esp32, other values for Esp8266 chipSelect Identifies the CS number for ESP8266, or the GPIO pin for ESP32 clockSpeed Bus speed
◆ end()
|
inline |
◆ execute()
|
inline |
◆ getBitOrder()
|
inline |
◆ getBitsPerClock()
|
inline |
◆ getChipSelect()
|
inline |
◆ getClockMode()
|
inline |
◆ getIoMode()
|
inline |
◆ getPinSet()
|
inline |
◆ getSpeed()
|
inline |
◆ getSupportedIoModes()
|
pure virtual |
Return set of IO modes supported by a device implementation.
Implemented in HSPI::RAM::IS62_65, HSPI::RAM::PSRAM64, and Graphics::SpiDisplay.
◆ isReady()
|
inline |
Determine if the device is initialised.
- Return values
-
bool
◆ isSupported()
◆ onTransfer()
|
inline |
Set a callback to be invoked before a request is started, and when it has finished.
- Parameters
-
callback Invoked in interrupt context, MUST be in IRAM
◆ setBitOrder()
|
inline |
◆ setClockMode()
|
inline |
◆ setIoMode()
Reimplemented in HSPI::RAM::PSRAM64, and HSPI::RAM::IS62_65.
◆ transferComplete()
◆ transferStarting()
|
inlineprotected |
◆ wait()
|
inline |
Member Data Documentation
◆ controller
| Controller& HSPI::Device::controller |
◆ Controller
|
protected |
The documentation for this class was generated from the following file:
1.8.17