mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-02-11 09:40:46 +00:00
Add some configuration for VBUS / VSYS (#1252)
The process for reading VBUS and VSYS on Pico and Pico W is different. It's hard to write code that compiles for both devices. Add some configuration to the board files. Fixes #1222
This commit is contained in:
parent
a42564b4b4
commit
e87f11bd2b
@ -81,4 +81,14 @@
|
||||
#define PICO_RP2040_B0_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
// Pin get VBUS
|
||||
#ifndef PICO_VBUS_PIN
|
||||
#define PICO_VBUS_PIN 24
|
||||
#endif
|
||||
|
||||
// Pin used to monitor VSYS using ADC
|
||||
#ifndef PICO_VSYS_PIN
|
||||
#define PICO_VSYS_PIN 29
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -99,4 +99,19 @@
|
||||
#define CYW43_WL_GPIO_LED_PIN 0
|
||||
#endif
|
||||
|
||||
// CYW43 GPIO to get VBUS
|
||||
#ifndef CYW43_WL_GPIO_VBUS_PIN
|
||||
#define CYW43_WL_GPIO_VBUS_PIN 2
|
||||
#endif
|
||||
|
||||
// VSYS pin is shared with CYW43
|
||||
#ifndef CYW43_USES_VSYS_PIN
|
||||
#define CYW43_USES_VSYS_PIN 1
|
||||
#endif
|
||||
|
||||
// Pin used to monitor VSYS using ADC
|
||||
#ifndef PICO_VSYS_PIN
|
||||
#define PICO_VSYS_PIN 29
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user