mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-24 09:43:38 +08:00
Fix existing calls to GPIO_Subscribe
This commit is contained in:
@@ -81,8 +81,8 @@ void Axis::set_step_dir_enabled(bool enable) {
|
||||
HAL_GPIO_Init(hw_config_.dir_port, &GPIO_InitStruct);
|
||||
|
||||
// Subscribe to rising edges of the step GPIO
|
||||
GPIO_subscribe(hw_config_.step_port, hw_config_.step_pin, GPIO_PULLDOWN,
|
||||
step_cb_wrapper, this);
|
||||
GPIO_subscribe(hw_config_.step_port, hw_config_.step_pin, GPIO_PULLDOWN,
|
||||
GPIO_MODE_IT_FALLING, step_cb_wrapper, this);
|
||||
|
||||
enable_step_dir_ = true;
|
||||
} else {
|
||||
|
||||
@@ -19,7 +19,7 @@ static void enc_index_cb_wrapper(void* ctx) {
|
||||
void Encoder::setup() {
|
||||
HAL_TIM_Encoder_Start(hw_config_.timer, TIM_CHANNEL_ALL);
|
||||
GPIO_subscribe(hw_config_.index_port, hw_config_.index_pin, GPIO_NOPULL,
|
||||
enc_index_cb_wrapper, this);
|
||||
GPIO_MODE_IT_RISING, enc_index_cb_wrapper, this);
|
||||
}
|
||||
|
||||
void Encoder::set_error(Encoder::Error_t error) {
|
||||
|
||||
Reference in New Issue
Block a user