From b533fcf5431bbefbb2ffedcc6a0dfc35a595a9bc Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 22 Nov 2022 13:43:05 +0100 Subject: [PATCH] cpu/nrf5x_common: improve doc on timer_conf_t::channels --- cpu/nrf5x_common/include/periph_cpu_common.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cpu/nrf5x_common/include/periph_cpu_common.h b/cpu/nrf5x_common/include/periph_cpu_common.h index 7e43a7dd09..c6fa1cfc4e 100644 --- a/cpu/nrf5x_common/include/periph_cpu_common.h +++ b/cpu/nrf5x_common/include/periph_cpu_common.h @@ -187,7 +187,14 @@ typedef enum { */ typedef struct { NRF_TIMER_Type *dev; /**< timer device */ - uint8_t channels; /**< number of channels available */ + /** + * @brief number of hardware channels ***minus one*** + * + * The last hardware channels is implicitly used by timer_read() and not + * available to the user. This value, hence, is the number of channels + * available to the user. + */ + uint8_t channels; uint8_t bitmode; /**< counter width */ uint8_t irqn; /**< IRQ number of the timer device */ } timer_conf_t;