File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
src/boards/include/boards Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 81
81
#define PICO_RP2040_B0_SUPPORTED 1
82
82
#endif
83
83
84
- // Pin get VBUS
84
+ // The GPIO Pin used to read VBUS to determine if the device is battery powered.
85
85
#ifndef PICO_VBUS_PIN
86
86
#define PICO_VBUS_PIN 24
87
87
#endif
88
88
89
- // Pin used to monitor VSYS using ADC
89
+ // The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
90
+ // There is an example in adc/read_vsys in pico-examples.
90
91
#ifndef PICO_VSYS_PIN
91
92
#define PICO_VSYS_PIN 29
92
93
#endif
Original file line number Diff line number Diff line change 99
99
#define CYW43_WL_GPIO_LED_PIN 0
100
100
#endif
101
101
102
- // CYW43 GPIO to get VBUS
102
+ // If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS.
103
+ // This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered.
104
+ // PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.
103
105
#ifndef CYW43_WL_GPIO_VBUS_PIN
104
106
#define CYW43_WL_GPIO_VBUS_PIN 2
105
107
#endif
106
108
107
- // VSYS pin is shared with CYW43
109
+ // If CYW43_USES_VSYS_PIN is defined then CYW43 uses the VSYS GPIO (defined by PICO_VSYS_PIN) for other purposes.
110
+ // If this is the case, to use the VSYS GPIO it's necessary to ensure CYW43 is not using it.
111
+ // This can be achieved by wrapping the use of the VSYS GPIO in cyw43_thread_enter / cyw43_thread_exit.
108
112
#ifndef CYW43_USES_VSYS_PIN
109
113
#define CYW43_USES_VSYS_PIN 1
110
114
#endif
111
115
112
- // Pin used to monitor VSYS using ADC
116
+ // The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
117
+ // There is an example in adc/read_vsys in pico-examples.
113
118
#ifndef PICO_VSYS_PIN
114
119
#define PICO_VSYS_PIN 29
115
120
#endif
You can’t perform that action at this time.
0 commit comments