Skip to content

Commit 22da7fd

Browse files
committed
drv/counter/core: clarify function docs
There was some copied/pasted info that was not quite correct.
1 parent 3b77f70 commit 22da7fd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/pbio/drv/counter/counter_core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ pbio_error_t pbdrv_counter_get_dev(uint8_t id, pbdrv_counter_dev_t **dev) {
4141
}
4242

4343
/**
44-
* Gets the absolute count if the counter supports it.
44+
* Gets the current count.
4545
* @param [in] dev Pointer to the counter device
4646
* @param [out] count Returns the count on success
4747
* @return ::PBIO_SUCCESS on success, ::PBIO_ERROR_NO_DEV if the
4848
* counter has not been initialized, ::PBIO_ERROR_NOT_SUPPORTED
49-
* if this counter does not support reading the absolute count.
49+
* if the counter driver is disabled.
5050
*/
5151
pbio_error_t pbdrv_counter_get_count(pbdrv_counter_dev_t *dev, int32_t *count) {
5252
return dev->funcs->get_count(dev, count);
@@ -58,7 +58,8 @@ pbio_error_t pbdrv_counter_get_count(pbdrv_counter_dev_t *dev, int32_t *count) {
5858
* @param [out] count Returns the count on success
5959
* @return ::PBIO_SUCCESS on success, ::PBIO_ERROR_NO_DEV if the
6060
* counter has not been initialized, ::PBIO_ERROR_NOT_SUPPORTED
61-
* if this counter does not support reading the absolute count.
61+
* if this counter does not support reading the absolute count
62+
* or the counter driver is disabled.
6263
*/
6364
pbio_error_t pbdrv_counter_get_abs_count(pbdrv_counter_dev_t *dev, int32_t *count) {
6465
if (!dev->funcs->get_abs_count) {
@@ -74,7 +75,7 @@ pbio_error_t pbdrv_counter_get_abs_count(pbdrv_counter_dev_t *dev, int32_t *coun
7475
* @param [out] rate Returns the rate on success
7576
* @return ::PBIO_SUCCESS on success, ::PBIO_ERROR_NO_DEV if the
7677
* counter has not been initialized, ::PBIO_ERROR_NOT_SUPPORTED
77-
* if this counter does not support reading the rate.
78+
* if the counter driver is disabled.
7879
*/
7980
pbio_error_t pbdrv_counter_get_rate(pbdrv_counter_dev_t *dev, int32_t *rate) {
8081
return dev->funcs->get_rate(dev, rate);

0 commit comments

Comments
 (0)