RISC-V/V203/usb/ch32v203/spiclass.h
2024-11-09 16:26:15 +01:00

20 lines
422 B
C++

#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;
void Init ();
void drq ();
bool send (const char * data, const unsigned len);
protected:
// void select (const bool set) const noexcept;
};
#endif // SPICLASS_H