File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,8 @@ config ARDUINO_ENTRY
3434 bool "Provide arduino setup and loop entry points"
3535 default y
3636
37+ config ARDUINO_MAX_TONES
38+ int "Specify the number of sounds that can be played simultaneously with tone()"
39+ default -1
40+
3741endif
Original file line number Diff line number Diff line change @@ -212,8 +212,10 @@ PinStatus digitalRead(pin_size_t pinNumber) {
212212 return (gpio_pin_get_dt (&arduino_pins[pinNumber]) == 1 ) ? HIGH : LOW;
213213}
214214
215- #ifndef MAX_TONE_PINS
215+ #if CONFIG_ARDUINO_MAX_TONES == -1
216216#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
217219#endif
218220
219221#define TOGGLES_PER_CYCLE 2ULL
You can’t perform that action at this time.
0 commit comments