Add motor speed control

This commit is contained in:
root 2022-03-21 22:37:13 +00:00
parent 1a488065ac
commit 5d8df998ae
5 changed files with 138 additions and 44 deletions

View file

@ -7,7 +7,7 @@
//SPI_MODE_3 (1,1) CPOL = 1, CPHA = 1, Clock idle high, data is clocked in on rising, edge output data (change) on falling edge
#define SPI_BUFFER_SIZE 20
#define SPI_SPEED 4000000 // 4 MHz
#define SPI_SPEED 2000000 // 2 MHz
#define SPI_BITS_PER_WORD 8
class Spi {