|
- #ifndef STEPPER_PARAMS_H
- #define STEPPER_PARAMS_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #include "board.h"
-
- #ifndef STEPPER_PARAM_STEP_PIN
- #define STEPPER_PARAM_STEP_PIN GPIO_PIN(1, 14)
- #endif
- #ifndef STEPPER_PARAM_DIR_PIN
- #define STEPPER_PARAM_DIR_PIN GPIO_PIN(1, 13)
- #endif
- #ifndef STEPPER_PARAM_ENABLE_PIN
- #define STEPPER_PARAM_ENABLE_PIN GPIO_PIN(1, 15)
- #endif
- #ifndef STEPPER_PARAM_UART
- #define STEPPER_PARAM_UART UART_DEV(1)
- #endif
- #ifndef STEPPER_PARAM_VEL_MAX
- #define STEPPER_PARAM_VEL_MAX STEPPER_PARAM_VEL_MAX_DEFAULT
- #endif
- #ifndef STEPPER_PARAM_ACC_MAX
- #define STEPPER_PARAM_ACC_MAX STEPPER_PARAM_ACC_MAX_DEFAULT
- #endif
- #ifndef STEPPER_PARAM_MICROSTEP
- #define STEPPER_PARAM_MICROSTEP STEPPER_PARAM_MICROSTEP_DEFAULT
- #endif
- #ifndef STEPPER_PARAM_DIVISION
- #define STEPPER_PARAM_DIVISION STEPPER_PARAM_DIVISION_DEFAULT
- #endif
-
- #ifndef STEPPER_PARAMS
- #define STEPPER_PARAMS \
- { .step_pin = STEPPER_PARAM_STEP_PIN, \
- .dir_pin = STEPPER_PARAM_DIR_PIN, \
- .enable_pin = STEPPER_PARAM_ENABLE_PIN, \
- .uart = STEPPER_PARAM_UART, \
- .vel_max = STEPPER_PARAM_VEL_MAX, \
- .acc_max = STEPPER_PARAM_ACC_MAX, \
- .microstep = STEPPER_PARAM_MICROSTEP, \
- .division = STEPPER_PARAM_DIVISION, \
- }
- #endif
-
-
- static const stepper_params_t stepper_params[] = {
- STEPPER_PARAMS
- };
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* STEPPER_PARAMS_H */
|