diff --git a/include/zh_avr_pcf8574.h b/include/zh_avr_pcf8574.h index bfe2941..11ca4f7 100644 --- a/include/zh_avr_pcf8574.h +++ b/include/zh_avr_pcf8574.h @@ -33,7 +33,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 124 byte. + uint8_t stack_size; // Stack size for task for the PCF8574 expander isr processing processing. 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. diff --git a/version.txt b/version.txt index 589268e..6261a05 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.3.0 \ No newline at end of file +1.3.1 \ No newline at end of file diff --git a/zh_avr_pcf8574.c b/zh_avr_pcf8574.c index 5d46713..b0c29f9 100644 --- a/zh_avr_pcf8574.c +++ b/zh_avr_pcf8574.c @@ -82,7 +82,7 @@ static avr_err_t _zh_avr_pcf8574_validate_config(const zh_avr_pcf8574_init_confi { ZH_ERROR_CHECK(config != NULL, AVR_ERR_INVALID_ARG); ZH_ERROR_CHECK((config->i2c_address >= 0x20 && config->i2c_address <= 0x27) || (config->i2c_address >= 0x38 && config->i2c_address <= 0x3F), AVR_ERR_INVALID_ARG); - ZH_ERROR_CHECK(config->task_priority > tskIDLE_PRIORITY && config->stack_size >= 124, AVR_ERR_INVALID_ARG); + ZH_ERROR_CHECK(config->task_priority > tskIDLE_PRIORITY && config->stack_size >= configMINIMAL_STACK_SIZE, AVR_ERR_INVALID_ARG); ZH_ERROR_CHECK(config->interrupt_gpio == 0xFF || (config->interrupt_gpio >= 0 && config->interrupt_gpio <= 7), AVR_ERR_INVALID_ARG); if (config->interrupt_gpio != 0xFF) {