File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
ports/raspberrypi/common-hal/microcontroller Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 26
26
27
27
#include "py/runtime.h"
28
28
29
+ #include "common-hal/microcontroller/__init__.h"
29
30
#include "shared-bindings/microcontroller/Pin.h"
30
31
31
32
#include "supervisor/shared/rgb_led_status.h"
@@ -46,7 +47,7 @@ bool speaker_enable_in_use;
46
47
STATIC uint32_t never_reset_pins ;
47
48
48
49
void reset_all_pins (void ) {
49
- for (size_t i = 0 ; i < 30 ; i ++ ) {
50
+ for (size_t i = 0 ; i < TOTAL_GPIO_COUNT ; i ++ ) {
50
51
if ((never_reset_pins & (1 << i )) != 0 ) {
51
52
continue ;
52
53
}
@@ -55,15 +56,15 @@ void reset_all_pins(void) {
55
56
}
56
57
57
58
void never_reset_pin_number (uint8_t pin_number ) {
58
- if (pin_number >= 32 ) {
59
+ if (pin_number >= TOTAL_GPIO_COUNT ) {
59
60
return ;
60
61
}
61
62
62
63
never_reset_pins |= 1 << pin_number ;
63
64
}
64
65
65
66
void reset_pin_number (uint8_t pin_number ) {
66
- if (pin_number >= 32 ) {
67
+ if (pin_number >= TOTAL_GPIO_COUNT ) {
67
68
return ;
68
69
}
69
70
@@ -134,7 +135,7 @@ void claim_pin(const mcu_pin_obj_t* pin) {
134
135
}
135
136
136
137
bool pin_number_is_free (uint8_t pin_number ) {
137
- if (pin_number >= 30 ) {
138
+ if (pin_number >= TOTAL_GPIO_COUNT ) {
138
139
return false;
139
140
}
140
141
You can’t perform that action at this time.
0 commit comments