some refactoring,
minor code changes added a small class for SNESController reading
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
template <int PIN_NUM_MISO, int PIN_NUM_MOSI, int PIN_NUM_CLK> class HardSPI {
|
||||
//class HardSPI {
|
||||
|
||||
static constexpr int MAX_LEN = 4000;
|
||||
static constexpr int MAX_LEN = 8192;
|
||||
|
||||
spi_device_handle_t spi;
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
|
||||
// DEVICE specific options
|
||||
memset(&devcfg, 0, sizeof(devcfg));
|
||||
devcfg.clock_speed_hz = 10 * 1000 * 1000;
|
||||
devcfg.clock_speed_hz = 20 * 1000 * 1000; // IMPORTANT!
|
||||
devcfg.mode = 0;
|
||||
devcfg.spics_io_num = -1;//PIN_NUM_CS; // currently not used
|
||||
devcfg.queue_size = 2;
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
|
||||
void read(uint8_t* dst, size_t len) {
|
||||
|
||||
// sanity check
|
||||
|
||||
Reference in New Issue
Block a user