Fix existing calls to GPIO_Subscribe

This commit is contained in:
Unknown
2018-08-28 23:12:53 -04:00
committed by unknown
parent 0600cb851c
commit 92fe075b9e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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 {
+1 -1
View File
@@ -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) {