|
@@ -1174,19 +1174,18 @@ void quickStop() {
|
1174
|
1174
|
|
1175
|
1175
|
#endif //BABYSTEPPING
|
1176
|
1176
|
|
1177
|
|
-// From Arduino DigitalPotControl example
|
1178
|
|
-void digitalPotWrite(int address, int value) {
|
1179
|
|
- #if HAS_DIGIPOTSS
|
|
1177
|
+#if HAS_DIGIPOTSS
|
|
1178
|
+
|
|
1179
|
+ // From Arduino DigitalPotControl example
|
|
1180
|
+ void digitalPotWrite(int address, int value) {
|
1180
|
1181
|
digitalWrite(DIGIPOTSS_PIN, LOW); // take the SS pin low to select the chip
|
1181
|
1182
|
SPI.transfer(address); // send in the address and value via SPI:
|
1182
|
1183
|
SPI.transfer(value);
|
1183
|
1184
|
digitalWrite(DIGIPOTSS_PIN, HIGH); // take the SS pin high to de-select the chip:
|
1184
|
1185
|
//delay(10);
|
1185
|
|
- #else
|
1186
|
|
- UNUSED(address);
|
1187
|
|
- UNUSED(value);
|
1188
|
|
- #endif
|
1189
|
|
-}
|
|
1186
|
+ }
|
|
1187
|
+
|
|
1188
|
+#endif //HAS_DIGIPOTSS
|
1190
|
1189
|
|
1191
|
1190
|
// Initialize Digipot Motor Current
|
1192
|
1191
|
void digipot_init() {
|