perf: updated isr handler

This commit is contained in:
2025-08-14 11:54:45 +03:00
parent 8c6460a1d1
commit dfebb15213
3 changed files with 5 additions and 8 deletions

View File

@@ -133,7 +133,7 @@ extern "C"
/** /**
* @brief PCF8574 ISR handler. * @brief PCF8574 ISR handler.
*/ */
void zh_avr_pcf8574_isr_handler(void); BaseType_t zh_avr_pcf8574_isr_handler(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@@ -1 +1 @@
1.0.0 1.1.0

View File

@@ -129,17 +129,14 @@ static avr_err_t _zh_avr_pcf8574_configure_interrupts(const zh_avr_pcf8574_init_
return AVR_OK; return AVR_OK;
} }
void zh_avr_pcf8574_isr_handler(void) BaseType_t zh_avr_pcf8574_isr_handler(void)
{ {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
if ((PIND & (1 << _interrupt_gpio)) == 0) if ((PIND & (1 << _interrupt_gpio)) == 0)
{ {
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
xSemaphoreGiveFromISR(_interrupt_semaphore, &xHigherPriorityTaskWoken); xSemaphoreGiveFromISR(_interrupt_semaphore, &xHigherPriorityTaskWoken);
if (xHigherPriorityTaskWoken == pdTRUE)
{
portYIELD();
};
} }
return xHigherPriorityTaskWoken;
} }
static void _zh_avr_pcf8574_isr_processing_task(void *pvParameter) static void _zh_avr_pcf8574_isr_processing_task(void *pvParameter)