[2.0.x] TMC2130 support for LPC platform (#9114)
This commit is contained in:
committed by
Scott Lahteine
parent
34160806c0
commit
5c69d45f5b
@ -56,6 +56,8 @@
|
||||
//#include "../../../MarlinConfig.h" //works except in U8g
|
||||
#include "spi_pins.h"
|
||||
#include "fastio.h"
|
||||
#include "LPC_SPI.h"
|
||||
#include "../SPI.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Public Variables
|
||||
@ -191,6 +193,20 @@
|
||||
WRITE(SS_PIN, HIGH);
|
||||
}
|
||||
|
||||
void SPIClass::begin() { spiBegin(); }
|
||||
|
||||
uint8_t SPIClass::transfer(uint8_t B) {
|
||||
return spiTransfer(B);
|
||||
}
|
||||
uint16_t SPIClass::transfer16(uint16_t data) {
|
||||
uint16_t buffer;
|
||||
buffer = transfer((data>>8) & 0xFF) << 8;
|
||||
buffer |= transfer(data & 0xFF) && 0xFF;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
SPIClass SPI;
|
||||
|
||||
#else
|
||||
|
||||
// hardware SPI
|
||||
|
Reference in New Issue
Block a user