style: updated comments

This commit is contained in:
aZholtikov committed 2026-09-27 11:42:10 +03:00
1 parent b07933690b
commit ad415b14a4
2 files changed
+5 -4

No files matched your search

+3 -4
View File
@@ -5,7 +5,7 @@
* and ESP-Timer to measure rotational speed in RPM. * and ESP-Timer to measure rotational speed in RPM.
* *
* The module leverages the ESP-IDF PCNT peripheral in quadrature decoder mode * The module leverages the ESP-IDF PCNT peripheral in quadrature decoder mode
* to count encoder pulses and an ESP-Timer running at 10 Hz to sample the * to count encoder pulses and an ESP-Timer running at 100 Hz to sample the
* accumulated count and compute RPM. The result is a non-blocking, RTOS-friendly * accumulated count and compute RPM. The result is a non-blocking, RTOS-friendly
* interface suitable for motor speed monitoring. * interface suitable for motor speed monitoring.
* *
@@ -71,7 +71,7 @@ extern "C"
/** /**
* @brief Initialize the tachometer with the provided configuration. * @brief Initialize the tachometer with the provided configuration.
* *
* Allocates a handle, configures the ESP-Timer (10 Hz sampling), and sets up * Allocates a handle, configures the ESP-Timer (100 Hz sampling), and sets up
* the PCNT peripheral in quadrature decoder mode with glitch filtering. * the PCNT peripheral in quadrature decoder mode with glitch filtering.
* *
* @param[in] config Pointer to the initialization configuration (must not be NULL) * @param[in] config Pointer to the initialization configuration (must not be NULL)
@@ -79,10 +79,9 @@ extern "C"
* *
* @return ESP_OK on success * @return ESP_OK on success
* @return ESP_ERR_INVALID_ARG if `config` or `handle` is NULL, or `encoder_pulses` is zero * @return ESP_ERR_INVALID_ARG if `config` or `handle` is NULL, or `encoder_pulses` is zero
* @return ESP_ERR_INVALID_STATE if the handle is already initialized. * @return ESP_ERR_INVALID_STATE if the handle is already initialized
* @return ESP_ERR_NO_MEM if memory allocation fails * @return ESP_ERR_NO_MEM if memory allocation fails
* @return ESP_FAIL if PCNT initialization or configuration failed * @return ESP_FAIL if PCNT initialization or configuration failed
*
*/ */
esp_err_t zh_tachometer_init(const zh_tachometer_init_config_t *config, zh_tachometer_handle_t **handle); esp_err_t zh_tachometer_init(const zh_tachometer_init_config_t *config, zh_tachometer_handle_t **handle);
+2
View File
@@ -30,6 +30,8 @@
* *
* @note This structure is opaque to callers and must only be accessed * @note This structure is opaque to callers and must only be accessed
* through the public API functions. * through the public API functions.
* @warning The timer callback runs from ISR context and must not call
* blocking or long-running operations.
*/ */
struct _zh_tachometer_handle_t struct _zh_tachometer_handle_t
{ {