|
@@ -1155,10 +1155,10 @@ void Stepper::report_positions() {
|
1155
|
1155
|
|
1156
|
1156
|
// From Arduino DigitalPotControl example
|
1157
|
1157
|
void Stepper::digitalPotWrite(int address, int value) {
|
1158
|
|
- digitalWrite(DIGIPOTSS_PIN, LOW); // take the SS pin low to select the chip
|
|
1158
|
+ WRITE(DIGIPOTSS_PIN, LOW); // take the SS pin low to select the chip
|
1159
|
1159
|
SPI.transfer(address); // send in the address and value via SPI:
|
1160
|
1160
|
SPI.transfer(value);
|
1161
|
|
- digitalWrite(DIGIPOTSS_PIN, HIGH); // take the SS pin high to de-select the chip:
|
|
1161
|
+ WRITE(DIGIPOTSS_PIN, HIGH); // take the SS pin high to de-select the chip:
|
1162
|
1162
|
//delay(10);
|
1163
|
1163
|
}
|
1164
|
1164
|
|
|
@@ -1275,21 +1275,21 @@ void Stepper::microstep_mode(uint8_t driver, uint8_t stepping_mode) {
|
1275
|
1275
|
void Stepper::microstep_readings() {
|
1276
|
1276
|
SERIAL_PROTOCOLLNPGM("MS1,MS2 Pins");
|
1277
|
1277
|
SERIAL_PROTOCOLPGM("X: ");
|
1278
|
|
- SERIAL_PROTOCOL(digitalRead(X_MS1_PIN));
|
1279
|
|
- SERIAL_PROTOCOLLN(digitalRead(X_MS2_PIN));
|
|
1278
|
+ SERIAL_PROTOCOL(READ(X_MS1_PIN));
|
|
1279
|
+ SERIAL_PROTOCOLLN(READ(X_MS2_PIN));
|
1280
|
1280
|
SERIAL_PROTOCOLPGM("Y: ");
|
1281
|
|
- SERIAL_PROTOCOL(digitalRead(Y_MS1_PIN));
|
1282
|
|
- SERIAL_PROTOCOLLN(digitalRead(Y_MS2_PIN));
|
|
1281
|
+ SERIAL_PROTOCOL(READ(Y_MS1_PIN));
|
|
1282
|
+ SERIAL_PROTOCOLLN(READ(Y_MS2_PIN));
|
1283
|
1283
|
SERIAL_PROTOCOLPGM("Z: ");
|
1284
|
|
- SERIAL_PROTOCOL(digitalRead(Z_MS1_PIN));
|
1285
|
|
- SERIAL_PROTOCOLLN(digitalRead(Z_MS2_PIN));
|
|
1284
|
+ SERIAL_PROTOCOL(READ(Z_MS1_PIN));
|
|
1285
|
+ SERIAL_PROTOCOLLN(READ(Z_MS2_PIN));
|
1286
|
1286
|
SERIAL_PROTOCOLPGM("E0: ");
|
1287
|
|
- SERIAL_PROTOCOL(digitalRead(E0_MS1_PIN));
|
1288
|
|
- SERIAL_PROTOCOLLN(digitalRead(E0_MS2_PIN));
|
|
1287
|
+ SERIAL_PROTOCOL(READ(E0_MS1_PIN));
|
|
1288
|
+ SERIAL_PROTOCOLLN(READ(E0_MS2_PIN));
|
1289
|
1289
|
#if HAS_MICROSTEPS_E1
|
1290
|
1290
|
SERIAL_PROTOCOLPGM("E1: ");
|
1291
|
|
- SERIAL_PROTOCOL(digitalRead(E1_MS1_PIN));
|
1292
|
|
- SERIAL_PROTOCOLLN(digitalRead(E1_MS2_PIN));
|
|
1291
|
+ SERIAL_PROTOCOL(READ(E1_MS1_PIN));
|
|
1292
|
+ SERIAL_PROTOCOLLN(READ(E1_MS2_PIN));
|
1293
|
1293
|
#endif
|
1294
|
1294
|
}
|
1295
|
1295
|
|