mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-02-05 18:40:21 +00:00
Improve the comments around VSYS/VBUS config. (#1414)
This commit is contained in:
parent
ab766096e5
commit
c0a615e99c
@ -81,12 +81,13 @@
|
||||
#define PICO_RP2040_B0_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
// Pin get VBUS
|
||||
// The GPIO Pin used to read VBUS to determine if the device is battery powered.
|
||||
#ifndef PICO_VBUS_PIN
|
||||
#define PICO_VBUS_PIN 24
|
||||
#endif
|
||||
|
||||
// Pin used to monitor VSYS using ADC
|
||||
// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
|
||||
// There is an example in adc/read_vsys in pico-examples.
|
||||
#ifndef PICO_VSYS_PIN
|
||||
#define PICO_VSYS_PIN 29
|
||||
#endif
|
||||
|
@ -99,17 +99,22 @@
|
||||
#define CYW43_WL_GPIO_LED_PIN 0
|
||||
#endif
|
||||
|
||||
// CYW43 GPIO to get VBUS
|
||||
// If CYW43_WL_GPIO_VBUS_PIN is defined then a CYW43 GPIO has to be used to read VBUS.
|
||||
// This can be passed to cyw43_arch_gpio_get to determine if the device is battery powered.
|
||||
// PICO_VBUS_PIN and CYW43_WL_GPIO_VBUS_PIN should not both be defined.
|
||||
#ifndef CYW43_WL_GPIO_VBUS_PIN
|
||||
#define CYW43_WL_GPIO_VBUS_PIN 2
|
||||
#endif
|
||||
|
||||
// VSYS pin is shared with CYW43
|
||||
// If CYW43_USES_VSYS_PIN is defined then CYW43 uses the VSYS GPIO (defined by PICO_VSYS_PIN) for other purposes.
|
||||
// If this is the case, to use the VSYS GPIO it's necessary to ensure CYW43 is not using it.
|
||||
// This can be achieved by wrapping the use of the VSYS GPIO in cyw43_thread_enter / cyw43_thread_exit.
|
||||
#ifndef CYW43_USES_VSYS_PIN
|
||||
#define CYW43_USES_VSYS_PIN 1
|
||||
#endif
|
||||
|
||||
// Pin used to monitor VSYS using ADC
|
||||
// The GPIO Pin used to monitor VSYS. Typically you would use this with ADC.
|
||||
// There is an example in adc/read_vsys in pico-examples.
|
||||
#ifndef PICO_VSYS_PIN
|
||||
#define PICO_VSYS_PIN 29
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user