Fix USE_A4988_STEPPER compilation

This commit is contained in:
Theo Arends 2019-10-17 15:28:46 +02:00
parent ddbfce488a
commit a62432f6eb
3 changed files with 12 additions and 7 deletions

View File

@ -428,7 +428,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#undef USE_RF_SENSOR // Disable support for RF sensor receiver (434MHz or 868MHz) (+0k8 code)
#undef USE_SM16716 // Disable support for SM16716 RGB LED controller (+0k7 code)
#undef USE_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_Stepper // Disable support for A4988_Stepper
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper
#undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code
@ -521,7 +521,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#undef USE_RF_SENSOR // Disable support for RF sensor receiver (434MHz or 868MHz) (+0k8 code)
#undef USE_SM16716 // Disable support for SM16716 RGB LED controller (+0k7 code)
#undef USE_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_Stepper // Disable support for A4988_Stepper
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper
#undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_BASIC
@ -610,7 +610,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#undef USE_RF_SENSOR // Disable support for RF sensor receiver (434MHz or 868MHz) (+0k8 code)
#undef USE_SM16716 // Disable support for SM16716 RGB LED controller (+0k7 code)
#undef USE_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_Stepper // Disable support for A4988_Stepper
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper
#undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_MINIMAL

View File

@ -19,9 +19,14 @@
*/
#ifdef USE_A4988_STEPPER
#include <A4988_Stepper.h>
/*********************************************************************************************\
* A4988 Stepper motor driver circuit
\*********************************************************************************************/
#define XDRV_25 25
#include <A4988_Stepper.h>
short A4988_dir_pin = pin[GPIO_MAX];
short A4988_stp_pin = pin[GPIO_MAX];
short A4988_ms1_pin = pin[GPIO_MAX];
@ -60,7 +65,7 @@ void A4988Init(void)
const char kA4988Commands[] PROGMEM = "Motor|" // prefix
"Move|Rotate|Turn|MIS|SPR|RPM";
void (* const A4988Command[])(void) PROGMEM = {
void (* const A4988Command[])(void) PROGMEM = {
&CmndDoMove,&CmndDoRotate,&CmndDoTurn,&CmndSetMIS,&CmndSetSPR,&CmndSetRPM};
void CmndDoMove(void) {
@ -130,4 +135,4 @@ bool Xdrv25(uint8_t function)
return result;
}
#endif
#endif // USE_A4988_STEPPER

View File

@ -170,7 +170,7 @@ a_features = [[
"USE_MAX31865","USE_CHIRP","USE_SOLAX_X1","USE_PAJ7620"
],[
"USE_BUZZER","USE_RDM6300","USE_IBEACON","USE_SML_M",
"USE_INA226","USE_A4988_Stepper","USE_DDS2382","USE_SM2135",
"USE_INA226","USE_A4988_STEPPER","USE_DDS2382","USE_SM2135",
"USE_SHUTTER","USE_PCF8574","USE_DDSU666","USE_DEEPSLEEP",
"USE_SONOFF_SC","USE_SONOFF_RF","USE_SONOFF_L1","",
"","","","",