[FL-1167] Rework GPIO and EXTI with LL lib (#424)
* api-hal-gpio: rework gpio on ll * one_wire_slave: rework gpio initialization * interrupts: add attribute weak to hal exti interrupts handlers * api-hal-gpio: add exti interrupt handlers * input: rework with api-hal-gpio interrupts * one_wire_slave: rework with api-hal-gpio interrupts * api-hal-gpio: fix incorrect exti line config * api-hal-gpio: add doxygen documentation * api-hal-gpio: add enable / disable interrupts * api-hal-gpio: add get_rfid_level * core: remove api-gpio * applications: rework gpio with api-hal-gpio * lib: rework gpio with api-hal-gpio * rfal: disable exti interrupt when rfal is inactive * rfal: add interrupt gpio reinitialization * api-hal-gpio: hide setting speed and pull mode LL implementation * stm32wbxx_it: remove unused EXTI handlers * api-hal-gpio: guard set, enable, disable and remove interrupt * Drop F4 target * Accessor: update gpio api usage Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ void PulseSequencer::start() {
|
||||
|
||||
init_timer(periods[period_index]);
|
||||
pin_state = pin_start_state;
|
||||
gpio_write(&ibutton_gpio, pin_state);
|
||||
hal_gpio_write(&ibutton_gpio, pin_state);
|
||||
pin_state = !pin_state;
|
||||
period_index = 1;
|
||||
|
||||
@@ -57,7 +57,7 @@ void PulseSequencer::init_timer(uint32_t period) {
|
||||
HAL_NVIC_SetPriority(TIM1_UP_TIM16_IRQn, 5, 0);
|
||||
HAL_NVIC_EnableIRQ(TIM1_UP_TIM16_IRQn);
|
||||
|
||||
gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain);
|
||||
hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
|
||||
}
|
||||
|
||||
void PulseSequencer::deinit_timer() {
|
||||
@@ -76,7 +76,7 @@ void PulseSequencer::timer_elapsed_callback(void* hw, void* context) {
|
||||
_this->pin_state = !_this->pin_state;
|
||||
}
|
||||
|
||||
gpio_write(&ibutton_gpio, _this->pin_state);
|
||||
hal_gpio_write(&ibutton_gpio, _this->pin_state);
|
||||
|
||||
_this->period_index++;
|
||||
|
||||
|
Reference in New Issue
Block a user