Skip to content

Commit e6a4276

Browse files
GitHub BuildGitHub Build
authored andcommitted
Applied Formatting Changes During GitHub Build
1 parent 5e3e705 commit e6a4276

8 files changed

Lines changed: 21 additions & 19 deletions

File tree

include/core/dev/MCUTimer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ enum class MCUTimer {
4646
/**
4747
* Gets the corresponding HAL TIM_TypeDef* for each MCUTimer
4848
* This function is inlined because of a couple of reasons.
49-
* 1. It is in a header file, and functions in header files should be inlined. https://clang.llvm.org/extra/clang-tidy/checks/misc/definitions-in-headers.html
49+
* 1. It is in a header file, and functions in header files should be inlined.
50+
* https://clang.llvm.org/extra/clang-tidy/checks/misc/definitions-in-headers.html
5051
* 2. When this function is not inlined, F3 targets will not build. This is because PWMF3xx requires its own
5152
* `timerInstance` function that requires an MCUTimer import. Since manager.hpp also includes MCUTimer.hpp, and has
5253
* generally broken imports (see [FWT-255] https://rit-evt.atlassian.net/browse/FWT-255).

include/core/dev/RTCTimer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class RTCTimer : public Timer {
7575
uint32_t time;
7676

7777
/** The amount of time it takes the timer to go off in SECONDS */
78-
uint32_t clockPeriod { };
78+
uint32_t clockPeriod{};
7979

8080
/** The epoc time the clock started */
8181
uint32_t startTime;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +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. 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.
31+
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource
32+
* conflicts do not occur. F334 Valid Options: TIM1, TIM2, TIM3, TIM15, TIM16, TIM17. F3O2 Valid Options: TIM1,
33+
* TIM2, TIM15, TIM16, TIM17.
3434
* @param[in] timerPeripheral The timer to use
3535
* @param[in] clockPeriod The clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
3636
* at this frequency.
@@ -77,9 +77,9 @@ class TimerF3xx : public Timer {
7777
/**
7878
* Handles the initialization of the timer module. Actually configures the device and enables it.
7979
*
80-
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource conflicts do not occur.
81-
* F334 Valid Options: TIM1, TIM2, TIM3, TIM15, TIM16, TIM17.
82-
* F3O2 Valid Options: TIM1, TIM2, TIM15, TIM16, TIM17.
80+
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource
81+
* conflicts do not occur. F334 Valid Options: TIM1, TIM2, TIM3, TIM15, TIM16, TIM17. F3O2 Valid Options: TIM1,
82+
* TIM2, TIM15, TIM16, TIM17.
8383
* @param[in] clockPeriod the clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
8484
* at that frequency.
8585
* @param[in] clockPrescaler the prescaler that the clock will use. If clockPrescaler is set to @ref AUTO_PRESCALER,

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ class TimerF4xx final : public Timer {
3030
* Will initialize the timer device on the STM with the given period and the given IRQ Handler
3131
* that triggers with the given period. Starts the timer
3232
*
33-
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource conflicts do not occur.
34-
* F446xx Valid Options: TIM1, TIM2, TIM3, TIM4, TIM5, TIM8, TIM9, TIM10, TIM11, TIM12, TIM13, TIM14.
33+
* @param timerPeripheral[in] The timer peripheral to configure. It is up to the user to verify that resource
34+
* conflicts do not occur. F446xx Valid Options: TIM1, TIM2, TIM3, TIM4, TIM5, TIM8, TIM9, TIM10, TIM11, TIM12,
35+
* TIM13, TIM14.
3536
* @param[in] timerPeripheral the timer peripheral to use.
3637
* @param[in] clockPeriod the clock period in ticks (ms when using AUTO_PRESCALER). An interrupt will be triggered
3738
* at this frequency.

samples/pwm/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* This example shows off a basic PWM signal. You will need to use a logic
33
* analyzer to see the generated square wave.
44
*/
5-
//#include <core/io/PWM.hpp>
5+
// #include <core/io/PWM.hpp>
66
#include <core/manager.hpp>
77
#include <core/utils/log.hpp>
88
#include <core/utils/time.hpp>

samples/rtc_timer/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int main() {
1414
// Specific implementation of dev::RTC, clock type can vary
1515
dev::RTC& clock = dev::getRTC();
1616

17-
dev::RTCTimer timer (clock, 5000);
17+
dev::RTCTimer timer(clock, 5000);
1818

1919
uart.printf("\r\nTimer starting!\r\n");
2020
uart.printf("Current time: %d\r\n", timer.getTime());

src/core/dev/platform/f3xx/Timerf3xx.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
TIM_HandleTypeDef halTimers[F302_TIMER_COUNT];
1010
void (*timerInterruptHandlers[F302_TIMER_COUNT])(void* context, void* htim) = {nullptr};
11-
void *timerInterruptContexts[F302_TIMER_COUNT] = { };
11+
void* timerInterruptContexts[F302_TIMER_COUNT] = {};
1212

1313
// Timer 6 is technically available but does not support Capture Compare channels, so is therefore not supported.
1414
enum timerInterruptIndex {
@@ -102,8 +102,8 @@ extern "C" void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim) {
102102

103103
TIM_HandleTypeDef halTimers[F334_TIMER_COUNT];
104104

105-
void (*timerInterruptHandlers[F334_TIMER_COUNT])(void *context, void* htim) = {nullptr};
106-
void *timerInterruptContexts[F334_TIMER_COUNT] = { };
105+
void (*timerInterruptHandlers[F334_TIMER_COUNT])(void* context, void* htim) = {nullptr};
106+
void* timerInterruptContexts[F334_TIMER_COUNT] = {};
107107

108108
// Timer 6 is technically available but does not support Capture Compare channels, so is therefore not supported.
109109
enum timerInterruptIndex {
@@ -234,7 +234,7 @@ extern "C" void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim) {
234234
uint8_t interruptIdx = getTimerInterruptIndex(htim->Instance);
235235

236236
if (timerInterruptHandlers[interruptIdx] != nullptr) {
237-
void *context = timerInterruptContexts[interruptIdx];
237+
void* context = timerInterruptContexts[interruptIdx];
238238
timerInterruptHandlers[interruptIdx](context, htim);
239239
}
240240
}
@@ -250,7 +250,7 @@ TimerF3xx::TimerF3xx(TIM_TypeDef* timerPeripheral, const uint32_t clockPeriod,
250250

251251
void TimerF3xx::initTimer(TIM_TypeDef* timerPeripheral, const uint32_t clockPeriod, const uint32_t clockPrescaler) {
252252
this->clockPeriod = clockPeriod;
253-
auto& htim = halTimers[getTimerInterruptIndex(timerPeripheral)];
253+
auto& htim = halTimers[getTimerInterruptIndex(timerPeripheral)];
254254

255255
htim.Instance = timerPeripheral;
256256
if (clockPrescaler == AUTO_PRESCALER) {

src/core/dev/platform/f4xx/Timerf4xx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
TIM_HandleTypeDef halTimers[F4_TIMER_COUNT];
88
void (*timerInterruptHandlers[F4_TIMER_COUNT])(void* context, void* htim) = {nullptr};
9-
void *timerInterruptContexts[F4_TIMER_COUNT] = { };
9+
void* timerInterruptContexts[F4_TIMER_COUNT] = {};
1010

1111
enum timerInterruptIndex {
1212
TIM1_IDX = 0u,
@@ -163,7 +163,7 @@ extern "C" void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim) {
163163
uint8_t interruptIdx = getTimerInterruptIndex(htim->Instance);
164164

165165
if (timerInterruptHandlers[interruptIdx] != nullptr) {
166-
void *context = timerInterruptContexts[interruptIdx];
166+
void* context = timerInterruptContexts[interruptIdx];
167167
timerInterruptHandlers[interruptIdx](context, htim);
168168
}
169169
}

0 commit comments

Comments
 (0)