RISC-V/V203/usb/ch32v203/spiclass.h

21 lines
422 B
C
Raw Normal View History

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