|
@@ -95,11 +95,11 @@ uint8_t L6470_SpiTransfer_Mode_3(uint8_t b) { // using Mode 3
|
95
|
95
|
* defined by the client (Marlin) to provide an SPI interface.
|
96
|
96
|
*/
|
97
|
97
|
|
98
|
|
-uint8_t L6470_transfer(uint8_t data, int _SSPin, const uint8_t chain_position) {
|
|
98
|
+uint8_t L6470_transfer(uint8_t data, int16_t ss_pin, const uint8_t chain_position) {
|
99
|
99
|
uint8_t data_out = 0;
|
100
|
100
|
|
101
|
101
|
// first device in chain has data sent last
|
102
|
|
- digitalWrite(_SSPin, LOW);
|
|
102
|
+ digitalWrite(ss_pin, LOW);
|
103
|
103
|
|
104
|
104
|
for (uint8_t i = L6470::chain[0]; (i >= 1) && !spi_abort; i--) { // stop sending data if spi_abort is active
|
105
|
105
|
DISABLE_ISRS(); // disable interrupts during SPI transfer (can't allow partial command to chips)
|
|
@@ -108,7 +108,7 @@ uint8_t L6470_transfer(uint8_t data, int _SSPin, const uint8_t chain_position) {
|
108
|
108
|
if (i == chain_position) data_out = temp;
|
109
|
109
|
}
|
110
|
110
|
|
111
|
|
- digitalWrite(_SSPin, HIGH);
|
|
111
|
+ digitalWrite(ss_pin, HIGH);
|
112
|
112
|
return data_out;
|
113
|
113
|
}
|
114
|
114
|
|