diff --git a/include/zh_avr_encoder.h b/include/zh_avr_encoder.h index b340981..b70278d 100644 --- a/include/zh_avr_encoder.h +++ b/include/zh_avr_encoder.h @@ -30,7 +30,7 @@ extern "C" typedef struct // Structure for initial initialization of encoder. { uint8_t task_priority; // Task priority for the encoder isr processing. @note It is not recommended to set a value less than configMAX_PRIORITIES. - uint16_t stack_size; // Stack size for task for the encoder isr processing processing. @note The minimum size is 124 bytes. + uint16_t stack_size; // Stack size for task for the encoder isr processing processing. uint8_t queue_size; // Queue size for task for the encoder processing. Depends on the number of encoders. uint8_t gpio_port; // Encoder GPIO port. @note Must be same for A and B GPIO. uint8_t a_gpio_number; // Encoder A GPIO number. diff --git a/version.txt b/version.txt index afaf360..7f20734 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.0 \ No newline at end of file +1.0.1 \ No newline at end of file diff --git a/zh_avr_encoder.c b/zh_avr_encoder.c index 117c72a..9719a10 100644 --- a/zh_avr_encoder.c +++ b/zh_avr_encoder.c @@ -64,7 +64,7 @@ avr_err_t zh_avr_encoder_reset(zh_avr_encoder_handle_t *handle) static avr_err_t _zh_avr_encoder_validate_config(const zh_avr_encoder_init_config_t *config) { ZH_ERROR_CHECK(config != NULL, 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->queue_size > 0, AVR_ERR_INVALID_ARG); ZH_ERROR_CHECK(config->encoder_max_value > config->encoder_min_value, AVR_ERR_INVALID_ARG); ZH_ERROR_CHECK(config->encoder_step > 0, AVR_ERR_INVALID_ARG);