File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ constexpr inline pin_size_t local_gpio_pin(pin_size_t gpin)
6969
7070constexpr inline pin_size_t global_gpio_pin_ (size_t port_idx, pin_size_t lpin)
7171{
72- return port_idx == size_t (-1 ) ? size_t (-1 ) : pins[ port_idx] + lpin;
72+ return port_idx == size_t (-1 ) ? size_t (-1 ) : end_accum ( port_idx) + lpin;
7373}
7474
7575constexpr inline pin_size_t global_gpio_pin (const struct device *lport, pin_size_t lpin)
@@ -257,7 +257,11 @@ struct pin_timer {
257257 uint32_t count;
258258};
259259
260- struct pin_timer arduino_pin_timers[20 ];
260+ #ifndef MAX_TONE_PINS
261+ #define MAX_TONE_PINS DT_PROP_LEN (DT_PATH(zephyr_user), digital_pin_gpios);
262+ #endif
263+
264+ struct pin_timer arduino_pin_timers[MAX_TONE_PINS];
261265
262266void tone_expiry_cb (struct k_timer *timer)
263267{
You can’t perform that action at this time.
0 commit comments