Skip to content

Commit a156271

Browse files
Alter subclasses to inherit docs.
Before this they were being copy and pasted, this should properly inherit. Signed-off-by: Taylor Lineman <git@actuallytaylor.com>
1 parent f933cef commit a156271

4 files changed

Lines changed: 25 additions & 76 deletions

File tree

include/core/dev/platform/f3xx/Timerf3xx.hpp

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ class TimerF3xx : public Timer {
2828
* Will initialize the timer device on the STM with the given period and the given IRQ Handler
2929
* that triggers with the given period. Starts the timer
3030
*
31-
* @param timerPeripheral[in] The timer peripheral to configure. Possible options for this board are
32-
* TIM1, TIM2, TIM15, TIM16, TIM17. It is up to the user to verify that resource conflicts do not occur.
31+
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource conflicts do not occur.
32+
* F334 Valid Options: TIM1, TIM2, TIM3, TIM15, TIM16, TIM17.
33+
* F3O2 Valid Options: TIM1, TIM2, TIM15, TIM16, TIM17.
3334
* @param[in] timerPeripheral The timer to use
3435
* @param[in] clockPeriod The clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
3536
* at this frequency.
@@ -42,38 +43,19 @@ class TimerF3xx : public Timer {
4243
const TimerConfiguration_t& configuration = defaultConfig,
4344
uint32_t clockPrescaler = AUTO_PRESCALER);
4445

45-
/**
46-
* Starts the given timer and registers the given interrupt pointer to trigger when the timer overflows
47-
* @param[in] irqHandler The IRQ Handler function pointer. Sets a new interrupt handler function
48-
* @param[in] context The context to be sent to the irqHandler when it is called.
49-
*/
46+
/** @inheritDoc */
5047
void startTimer(void (*irqHandler)(void* context, void* htim), void* context) override;
5148

52-
/**
53-
* Starts the given timer using the IRQ Handler already assigned to that timer.
54-
*/
49+
/** @inheritDoc */
5550
void startTimer() override;
5651

57-
/**
58-
* Stops the current timer from running. Does not complete its current counting sequence.
59-
*/
52+
/** @inheritDoc */
6053
void stopTimer() override;
6154

62-
/**
63-
* Resets the timer counter.
64-
*/
55+
/** @inheritDoc */
6556
void reloadTimer() override;
6657

67-
/**
68-
* Set the clock period for the timer. Will stop the timer, re-initialize the device with the updated period.
69-
* You must call startTimer again to continue timer operation.
70-
*
71-
* @param[in] clockPeriod The clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
72-
* at that frequency.
73-
* @param [in] clockPrescaler The prescaler used by the clock. Divides the system clock frequency to get it within
74-
* an acceptable range for clocking. If set to @ref AUTO_PRESCALER, the function implementation should calculate its
75-
* own prescaler.
76-
*/
58+
/** @inheritDoc */
7759
void setPeriod(uint32_t clockPeriod, uint32_t clockPrescaler = AUTO_PRESCALER) override;
7860

7961
protected:
@@ -95,7 +77,7 @@ class TimerF3xx : public Timer {
9577
/**
9678
* Handles the initialization of the timer module. Actually configures the device and enables it.
9779
*
98-
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource conflicts do not occur.
80+
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource conflicts do not occur.
9981
* F334 Valid Options: TIM1, TIM2, TIM3, TIM15, TIM16, TIM17.
10082
* F3O2 Valid Options: TIM1, TIM2, TIM15, TIM16, TIM17.
10183
* @param[in] clockPeriod the clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered

include/core/dev/platform/f4xx/Timerf4xx.hpp

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,19 @@ class TimerF4xx final : public Timer {
4444
const TimerConfiguration_t& configuration = defaultConfig,
4545
uint32_t clockPrescaler = AUTO_PRESCALER);
4646

47-
/**
48-
* Starts the given timer and registers the given interrupt pointer to trigger when the timer overflows
49-
* @param[in] irqHandler The IRQ Handler function pointer. Sets a new interrupt handler function
50-
*/
47+
/** @inheritDoc */
5148
void startTimer(void (*irqHandler)(void* context, void* htim), void* context) override;
5249

53-
/**
54-
* Starts the given timer using the IRQ Handler already assigned to that timer.
55-
*/
50+
/** @inheritDoc */
5651
void startTimer() override;
5752

58-
/**
59-
* Stops the current timer from running. Does not complete its current counting sequence.
60-
*/
53+
/** @inheritDoc */
6154
void stopTimer() override;
6255

63-
/**
64-
* Resets the timer counter.
65-
*/
56+
/** @inheritDoc */
6657
void reloadTimer() override;
6758

68-
/**
69-
* Set the clock period for the timer. Will stop the timer, re-initialize the device with the updated period.
70-
* You must call startTimer again to continue timer operation.
71-
*
72-
* @param[in] clockPeriod the clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
73-
* at that frequency.
74-
* @param [in] clockPrescaler the prescaler used by the clock. Divides the system clock frequency to get it within
75-
* an acceptable range for clocking. If set to @ref AUTO_PRESCALER, the function implementation should calculate its
76-
* own prescaler.
77-
*/
59+
/** @inheritDoc */
7860
void setPeriod(uint32_t clockPeriod, uint32_t clockPrescaler = AUTO_PRESCALER) override;
7961

8062
protected:

include/core/io/platform/f3xx/PWMf3xx.hpp

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,22 @@ namespace core::io {
1515
*/
1616
class PWMf3xx : public PWM, public dev::TimerF3xx {
1717
public:
18-
/**
19-
* Set up the given pin for PWM usage.
20-
*
21-
* @param pin[in] The pin to set up for PWM
22-
*/
18+
/** @inheritDoc */
2319
explicit PWMf3xx(Pin pin);
2420

25-
/**
26-
* Set the duty cycle for PWM
27-
* @param[in] dutyCycle The duty cycle to set PWM at.
28-
*/
21+
/** @inheritDoc */
2922
void setDutyCycle(uint32_t dutyCycle) override;
3023

3124
/**
32-
* Set the period for PWM.
33-
* Note: This does not match the dev::TimerF3xx set period, since PWM does not accept a different period.
34-
* This function will hide the definition from the superclass. So you can safely ignore the warning.
35-
* @param[in] period The period for PWM.
25+
* @inheritDoc PWM::setPeriod
26+
* This function will hide the definition from the TimerF3xx. So you can safely ignore the warning.
3627
*/
3728
void setPeriod(uint32_t period);
3829

39-
/**
40-
* Get the current duty cycle.
41-
* @return the duty cycle that the PWM instance is currently running at.
42-
*/
30+
/** @inheritDoc */
4331
uint32_t getDutyCycle() override;
4432

45-
/**
46-
* Get the current period.
47-
* @return the period that the PWM instance is currently running at.
48-
*/
33+
/** @inheritDoc */
4934
uint32_t getPeriod() override;
5035

5136
private:

include/core/io/platform/f4xx/PWMf4xx.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ namespace core::io {
1111

1212
class PWMf4xx : public PWM {
1313
public:
14-
/**
15-
* Setup the given pin for PWM usage.
16-
*
17-
* @param pin[in] The pin to setup for PWM
18-
*/
14+
/** @inheritDoc */
1915
PWMf4xx(Pin pin);
2016

17+
/** @inheritDoc */
2118
void setDutyCycle(uint32_t dutyCycle) override;
2219

20+
/** @inheritDoc */
2321
void setPeriod(uint32_t period) override;
2422

23+
/** @inheritDoc */
2524
uint32_t getDutyCycle() override;
2625

26+
/** @inheritDoc */
2727
uint32_t getPeriod() override;
2828

2929
private:

0 commit comments

Comments
 (0)