Skip to content

Commit 017636a

Browse files
committed
x
1 parent d26c7cc commit 017636a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cores/arduino/zephyrCommon.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ PinStatus digitalRead(pin_size_t pinNumber) {
218218

219219
#define TOGGLES_PER_CYCLE 2ULL
220220

221-
struct pin_timer {
221+
static struct pin_timer {
222222
struct k_timer timer;
223223
uint32_t count;
224224
pin_size_t pin;
@@ -266,7 +266,8 @@ void tone(pin_size_t pinNumber, unsigned int frequency,
266266
}
267267

268268
arduino_pin_timers[pinNumber].infinity = (duration == 0);
269-
arduino_pin_timers[pinNumber].count = (uint64_t)duration * frequency * (MSEC_PER_SEC / TOGGLES_PER_CYCLE);
269+
arduino_pin_timers[pinNumber].count = (uint64_t)duration * frequency *
270+
(MSEC_PER_SEC / TOGGLES_PER_CYCLE);
270271
arduino_pin_timers[pinNumber].pin = pinNumber;
271272
k_timer_init(timer, tone_expiry_cb, NULL);
272273

0 commit comments

Comments
 (0)