21: m_externalInterruptPort(externalInterruptPort),
22 m_handle{externalInterruptPinLine, nullptr}
41 if (pin == 0x01 << (m_handle.Line & EXTI_PIN_MASK))
50 EXTI_ConfigTypeDef configTypeDef;
51 configTypeDef.Trigger = trigger;
52 configTypeDef.Line = m_handle.Line;
53 configTypeDef.Mode = EXTI_MODE_INTERRUPT;
54 configTypeDef.GPIOSel = m_externalInterruptPort;
56 SEMF_INFO(
"set trigger %u for pin on line %u", trigger, 0x01 << (m_handle.Line & EXTI_PIN_MASK));
58 HAL_StatusTypeDef hal_status = HAL_EXTI_SetConfigLine(&m_handle, &configTypeDef);
60 if (hal_status != HAL_OK)
62 if (hal_status != HAL_OK)
64 if (hal_status == HAL_ERROR)
69 else if (hal_status == HAL_BUSY)
74 else if (hal_status == HAL_TIMEOUT)
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
LinkedQueue is an managed single linked queue implementation.
ExternalInterrupt implementation for STM32.
static LinkedQueue< Stm32ExternalInterrupt > * queue()
Get the list with all external interrupts.
Stm32ExternalInterrupt(uint32_t externalInterruptPort, uint32_t externalInterruptPinLine)
Constructor.
@ SetConfigLine_HalTimeout
static void systemIsr(uint16_t pin)
void setTrigger(Trigger trigger) override
Sets the trigger condition of an EXTI.
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)