AEM
|
#include <yspi.h>
Public Member Functions | |
virtual void | setSS (uint8_t highLow) const =0 |
virtual void | beginTransaction () const =0 |
virtual uint8_t | transfer (uint8_t data) const =0 |
virtual void | endTransaction () const =0 |
YPSI abstract class. This serves as a defintion of the YSPI interface. Note: all the methods are const, thus once instatiated, the itnernal state of the YSPI instance never changes. Typical Usage of the concrete children classes:
instanciation
YSPI* yspiPtr = new ChildClass(...);
Transaction: yspiPtr->beginTransaction();
uint8_t result = yspiPtr->transfer(outgoingByte);
yspiPtr->endTransaction();
if needed, control the Slave Select pin value
yspiPtr->setSS(HIGH); // set to HIGH
yspiPtr->setSS(LOW); // set to LOW
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |