Skip to content

Commit 70ef6c7

Browse files
committed
Split function call across multiple lines and document parameters for better readability.
1 parent c47fb07 commit 70ef6c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cores/arduino/time.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ void startAgt() {
3030
// on the Portenta C33 the AGT clock is 50 Mhz / 8 -> 6250 ticks per ms
3131
const uint32_t clock_freq_Hz = R_FSP_SystemClockHzGet(FSP_PRIV_CLOCK_PCLKB);
3232
const uint32_t period = clock_freq_Hz / ((1 << TIMER_SOURCE_DIV_8) * 1000UL);
33-
agt_timer.begin(TIMER_MODE_PERIODIC, AGT_TIMER, 0, period, 1, TIMER_SOURCE_DIV_8, timer_micros_callback);;
33+
agt_timer.begin(/* mode */ TIMER_MODE_PERIODIC,
34+
/* type */ AGT_TIMER,
35+
/* channel */ 0,
36+
period,
37+
/* pulse */ 1,
38+
TIMER_SOURCE_DIV_8,
39+
timer_micros_callback);;
3440
agt_timer.setup_overflow_irq(8);
3541
agt_timer.open();
3642
agt_timer.start(); // bug in R4 1.0.2: calling start() is not necessary: open() starts the counter already !?

0 commit comments

Comments
 (0)