Skip to content

Commit 077e982

Browse files
committed
doc(hardwaretimer): update after hardening
See stm32duino/Arduino_Core_STM32#2572 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 1f16f37 commit 077e982

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

HardwareTimer-library.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ Each timer may provide several channels, nevertheless it is important to underst
8686

8787
// The following function(s) are available for more advanced timer options
8888
TIM_HandleTypeDef *getHandle(); // return the handle address for HAL related configuration
89-
int getChannel(uint32_t channel);
90-
int getLLChannel(uint32_t channel);
91-
int getIT(uint32_t channel);
92-
int getAssociatedChannel(uint32_t channel);
89+
uint32_t getChannel(uint32_t channel);
90+
uint32_t getLLChannel(uint32_t channel);
91+
uint32_t getIT(uint32_t channel);
92+
uint32_t getAssociatedChannel(uint32_t channel);
9393
#if defined(TIM_CCER_CC1NE)
9494
bool isComplementaryChannel[TIMER_CHANNELS];
9595
#endif
@@ -119,12 +119,15 @@ __Example__:
119119
MyTim->setMode(channel, TIMER_OUTPUT_COMPARE_PWM1, pin);
120120
```
121121
122+
123+
> [!CAUTION]
124+
> Since core release 2.9.0: `TIMER_DISABLED` and `TIMER_OUTPUT_COMPARE` are obsolete and replaced by `TIMER_OUTPUT_DISABLED`.
125+
122126
Supported Mode:
123127
```C
124128
typedef enum {
125-
TIMER_DISABLED, // == TIM_OCMODE_TIMING no output, useful for only-interrupt
129+
TIMER_OUTPUT_DISABLED, // == TIM_OCMODE_TIMING no output, useful for only-interrupt
126130
// Output Compare
127-
TIMER_OUTPUT_COMPARE, // == Obsolete, use TIMER_DISABLED instead. Kept for compatibility reason
128131
TIMER_OUTPUT_COMPARE_ACTIVE, // == TIM_OCMODE_ACTIVE pin is set high when counter == channel compare
129132
TIMER_OUTPUT_COMPARE_INACTIVE, // == TIM_OCMODE_INACTIVE pin is set low when counter == channel compare
130133
TIMER_OUTPUT_COMPARE_TOGGLE, // == TIM_OCMODE_TOGGLE pin toggles when counter == channel compare

0 commit comments

Comments
 (0)