2024-11-08 20:56:19 +01:00
|
|
|
#ifndef SPICLASS_H
|
|
|
|
#define SPICLASS_H
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
static constexpr unsigned SPIBUFLEN = 8u;
|
|
|
|
|
|
|
|
class SpiClass {
|
|
|
|
unsigned total;
|
|
|
|
volatile bool complete;
|
|
|
|
char buffer [SPIBUFLEN];
|
|
|
|
public:
|
|
|
|
explicit SpiClass () noexcept;
|
2024-11-09 16:26:15 +01:00
|
|
|
void Init ();
|
|
|
|
void drq ();
|
2024-11-08 20:56:19 +01:00
|
|
|
bool send (const char * data, const unsigned len);
|
2024-11-09 16:26:15 +01:00
|
|
|
protected:
|
|
|
|
// void select (const bool set) const noexcept;
|
2024-11-08 20:56:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SPICLASS_H
|