Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some configuration for VBUS / VSYS #1252

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/boards/include/boards/pico.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions src/boards/include/boards/pico_w.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
peterharperuk marked this conversation as resolved.
Show resolved Hide resolved
#endif

// VSYS pin is shared with CYW43
#ifndef CYW43_USES_VSYS_PIN
#define CYW43_USES_VSYS_PIN 1
peterharperuk marked this conversation as resolved.
Show resolved Hide resolved
#endif

// Pin used to monitor VSYS using ADC
#ifndef PICO_VSYS_PIN
#define PICO_VSYS_PIN 29
#endif

#endif