@@ -21,15 +21,15 @@ bool cyw_ever_init;
21
21
static uint32_t cyw_pin_claimed ;
22
22
23
23
void reset_pin_number_cyw (uint8_t pin_no ) {
24
- cyw_pin_claimed &= ~(1 << pin_no );
24
+ cyw_pin_claimed &= ~(1LL << pin_no );
25
25
}
26
26
#endif
27
27
28
28
static uint64_t never_reset_pins ;
29
29
30
30
void reset_all_pins (void ) {
31
31
for (size_t i = 0 ; i < NUM_BANK0_GPIOS ; i ++ ) {
32
- if ((never_reset_pins & (1 << i )) != 0 ) {
32
+ if ((never_reset_pins & (1LL << i )) != 0 ) {
33
33
continue ;
34
34
}
35
35
reset_pin_number (i );
@@ -50,7 +50,7 @@ void never_reset_pin_number(uint8_t pin_number) {
50
50
return ;
51
51
}
52
52
53
- never_reset_pins |= 1 << pin_number ;
53
+ never_reset_pins |= 1LL << pin_number ;
54
54
}
55
55
56
56
// By default, all pins get reset in the same way
@@ -63,8 +63,8 @@ void reset_pin_number(uint8_t pin_number) {
63
63
return ;
64
64
}
65
65
66
- gpio_bank0_pin_claimed &= ~(1 << pin_number );
67
- never_reset_pins &= ~(1 << pin_number );
66
+ gpio_bank0_pin_claimed &= ~(1LL << pin_number );
67
+ never_reset_pins &= ~(1LL << pin_number );
68
68
69
69
// Allow the board to override the reset state of any pin
70
70
if (board_reset_pin_number (pin_number )) {
@@ -97,27 +97,27 @@ void common_hal_reset_pin(const mcu_pin_obj_t *pin) {
97
97
void claim_pin (const mcu_pin_obj_t * pin ) {
98
98
#if CIRCUITPY_CYW43
99
99
if (pin -> base .type == & cyw43_pin_type ) {
100
- cyw_pin_claimed |= (1 << pin -> number );
100
+ cyw_pin_claimed |= (1LL << pin -> number );
101
101
return ;
102
102
}
103
103
#endif
104
104
if (pin -> number >= NUM_BANK0_GPIOS ) {
105
105
return ;
106
106
}
107
- gpio_bank0_pin_claimed |= (1 << pin -> number );
107
+ gpio_bank0_pin_claimed |= (1LL << pin -> number );
108
108
}
109
109
110
110
bool pin_number_is_free (uint8_t pin_number ) {
111
111
if (pin_number >= NUM_BANK0_GPIOS ) {
112
112
return false;
113
113
}
114
- return !(gpio_bank0_pin_claimed & (1 << pin_number ));
114
+ return !(gpio_bank0_pin_claimed & (1LL << pin_number ));
115
115
}
116
116
117
117
bool common_hal_mcu_pin_is_free (const mcu_pin_obj_t * pin ) {
118
118
#if CIRCUITPY_CYW43
119
119
if (pin -> base .type == & cyw43_pin_type ) {
120
- return !(cyw_pin_claimed & (1 << pin -> number ));
120
+ return !(cyw_pin_claimed & (1LL << pin -> number ));
121
121
}
122
122
#endif
123
123
return pin_number_is_free (pin -> number );
0 commit comments