We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c4ef9b commit 41a8a6bCopy full SHA for 41a8a6b
2 files changed
Kconfig
@@ -34,4 +34,8 @@ config ARDUINO_ENTRY
34
bool "Provide arduino setup and loop entry points"
35
default y
36
37
+config ARDUINO_MAX_TONES
38
+ int "Specify the number of sounds that can be played simultaneously with tone()"
39
+ default -1
40
+
41
endif
cores/arduino/zephyrCommon.cpp
@@ -212,8 +212,10 @@ PinStatus digitalRead(pin_size_t pinNumber) {
212
return (gpio_pin_get_dt(&arduino_pins[pinNumber]) == 1) ? HIGH : LOW;
213
}
214
215
-#ifndef MAX_TONE_PINS
+#if CONFIG_ARDUINO_MAX_TONES == -1
216
#define MAX_TONE_PINS DT_PROP_LEN(DT_PATH(zephyr_user), digital_pin_gpios)
217
+#else
218
+#define MAX_TONE_PINS CONFIG_ARDUINO_MAX_TONES
219
#endif
220
221
#define TOGGLES_PER_CYCLE 2ULL
0 commit comments