|
- #ifndef STEPPER_PARAMS_H
- #define STEPPER_PARAMS_H
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #include "board.h"
-
- #ifndef STEPPER_STEP_PIN
- #define STEPPER_STEP_PIN GPIO_PIN(0, 0)
- #endif
- #ifndef STEPPER_DIR_PIN
- #define STEPPER_DIR_PIN GPIO_PIn(0, 1)
- #endif
- #ifndef STEPPER_UART
- #define STEPPER_UART UART(0)
- #endif
- #ifndef STEPPER_VEL_MAX
- #define STEPPER_VEL_MAX STEPPER_VEL_MAX_DEFAULT
- #endif
- #ifndef STEPPER_ACC_MAX
- #define STEPPER_ACC_MAX STEPPER_ACC_MAX_DEFAULT
- #endif
- #ifndef STEPPER_MICROSTEP
- #define STEPPER_MICROSTEP STEPPER_MICROSTEP_DEFAULT
- #endif
- #ifndef STEPPER_DIVISION
- #define STEPPER_DIVISION STEPPER_DIVISION_DEFAULT
- #endif
- #ifndef STEPPER_ANGLE
- #define STEPPER_ANGLE STEPPER_ANGLE_DEFAULT
- #endif
- #ifndef STEPPER_VELOCITY
- #define STEPPER_VELOCITY STEPPER_VELOCITY_DEFAULT
- #endif
- #ifndef STEPPER_SENSOR
- #define STEPPER_SENSOR STEPPER_SENSOR_DEFAULT
- #endif
- #ifndef STEPPER_HOMING_ANGLE
- #define STEPPER_HOMING_ANGLE STEPPER_HOMING_ANGLE_DEFAULT
- #endif
-
- #ifndef STEPPER_PARAMS
- #define STEPPER_PARAMS \
- { .step_pin = stepper_param_step_pin, \
- .dir_pin = stepper_param_dir_pin, \
- .addr = stepper_param_addr, \
- .vel_max = stepper_param_vel_max, \
- .acc_max = stepper_param_acc_max, \
- .microstep = stepper_param_microstep, \
- .division = stepper_param_division, \
- .angle = stepper_param_angle, \
- .velocity = stepper_param_velocity, \
- .sensor = stepper_param_sensor, \
- .homing_angle = stepper_param_homing_angle, \
- }
- #endif
-
-
- static const stepper_params_t stepper_params[] = {
- STEPPER_PARAMS
- };
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* STEPPER_PARAMS_H */
|