From 7e9f7e8071bbfc88f4153f0c69d48ef26352b103 Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Tue, 12 Aug 2025 08:51:21 +0300 Subject: [PATCH] wip: --- include/zh_avr_pcf8574.h | 11 ++++++----- zh_avr_pcf8574.c | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/zh_avr_pcf8574.h b/include/zh_avr_pcf8574.h index eea72ee..b8f7bfe 100644 --- a/include/zh_avr_pcf8574.h +++ b/include/zh_avr_pcf8574.h @@ -30,7 +30,7 @@ extern "C" typedef struct // Structure for initial initialization of PCF8574 expander. { uint8_t task_priority; // Task priority for the PCF8574 expander isr processing. @note It is not recommended to set a value less than configMAX_PRIORITIES. - uint8_t stack_size; // Stack size for task for the PCF8574 expander isr processing processing. @note The minimum size is 2048 bytes. + uint8_t stack_size; // Stack size for task for the PCF8574 expander isr processing processing. @note The minimum size is 124 byte. uint8_t i2c_address; // Expander I2C address. bool p0_gpio_work_mode; // Expander GPIO PO work mode. True for input, false for output. bool p1_gpio_work_mode; // Expander GPIO P1 work mode. True for input, false for output. @@ -81,8 +81,6 @@ extern "C" * @param[in] handle Pointer to unique PCF8574 handle. * @param[out] reg Pointer to GPIO's status. * - * @note For input GPIO's status will be 1 (HIGH) always. - * * @return AVR_OK if success or an error code otherwise. */ avr_err_t zh_avr_pcf8574_read(zh_avr_pcf8574_handle_t *handle, uint8_t *reg); @@ -115,8 +113,6 @@ extern "C" * @param[in] gpio GPIO number. * @param[out] status Pointer to GPIO status (true - HIGH, false - LOW). * - * @note For input GPIO's status will be 1 (HIGH) always. - * * @return AVR_OK if success or an error code otherwise. */ avr_err_t zh_avr_pcf8574_read_gpio(zh_avr_pcf8574_handle_t *handle, uint8_t gpio, bool *status); @@ -134,6 +130,11 @@ extern "C" */ avr_err_t zh_avr_pcf8574_write_gpio(zh_avr_pcf8574_handle_t *handle, uint8_t gpio, bool status); + /** + * @brief PCF8574 ISR handler. + */ + void zh_avr_pcf8574_isr_handler(void); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/zh_avr_pcf8574.c b/zh_avr_pcf8574.c index d6d29f5..408e409 100644 --- a/zh_avr_pcf8574.c +++ b/zh_avr_pcf8574.c @@ -9,7 +9,6 @@ static zh_avr_vector_t _vector = {0}; static avr_err_t _zh_avr_pcf8574_validate_config(const zh_avr_pcf8574_init_config_t *config); static avr_err_t _zh_avr_pcf8574_configure_i2c_device(const zh_avr_pcf8574_init_config_t *config, zh_avr_pcf8574_handle_t *handle); static avr_err_t _zh_avr_pcf8574_configure_interrupts(const zh_avr_pcf8574_init_config_t *config, zh_avr_pcf8574_handle_t handle); -extern void zh_avr_pcf8574_isr_handler(void); static void _zh_avr_pcf8574_isr_processing_task(void *pvParameter); static avr_err_t _zh_avr_pcf8574_read_register(zh_avr_pcf8574_handle_t *handle, uint8_t *reg); static avr_err_t _zh_avr_pcf8574_write_register(zh_avr_pcf8574_handle_t *handle, uint8_t reg);