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)
69
69
70
70
constexpr inline pin_size_t global_gpio_pin_ (size_t port_idx, pin_size_t lpin)
71
71
{
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;
73
73
}
74
74
75
75
constexpr inline pin_size_t global_gpio_pin (const struct device *lport, pin_size_t lpin)
@@ -257,7 +257,11 @@ struct pin_timer {
257
257
uint32_t count;
258
258
};
259
259
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];
261
265
262
266
void tone_expiry_cb (struct k_timer *timer)
263
267
{
You can’t perform that action at this time.
0 commit comments