Skip to content

Commit

Permalink
[RP2XXX] bump Pico Core up to 4.0.1 (it uses Pico SDK 2.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Aug 26, 2024
1 parent 3ffea83 commit 4b2fa20
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ jobs:
fi
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" --save-prefs ;
arduino --install-boards rp2040:rp2040:3.9.5 ;
arduino --install-boards rp2040:rp2040:4.0.1 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "rp2040:rp2040:rpipicow" ]]; then
arduino --pref "custom_freq=rpipicow_120" --save-prefs ;
Expand Down
7 changes: 7 additions & 0 deletions software/firmware/source/SkyView/Platform_RP2040.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ static void RP2040_fini()

// back from dormant state
rosc_enable();
#if PICO_SDK_VERSION_MAJOR < 2
clocks_init();
#endif /* PICO_SDK_VERSION_MAJOR */

rp2040.restart();
}
Expand Down Expand Up @@ -667,8 +669,13 @@ static float RP2040_Battery_voltage()
}

#if SOC_GPIO_PIN_BATTERY != SOC_UNUSED_PIN
#if PICO_SDK_VERSION_MAJOR < 2
enum gpio_function pin25_func;
enum gpio_function pin29_func;
#else
gpio_function_t pin25_func;
gpio_function_t pin29_func;
#endif /* PICO_SDK_VERSION_MAJOR */
uint pin25_dir;
uint pin29_dir;

Expand Down
3 changes: 3 additions & 0 deletions software/firmware/source/SkyView/Platform_RP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#define Serial_setDebugOutput(x) ({})
#define WIFI_STA_TIMEOUT 20000
extern WebServer server;
#if PICO_SDK_VERSION_MAJOR == 2
#define EXCLUDE_BLUETOOTH
#endif /* PICO_SDK_VERSION_MAJOR */
#else
#include <Arduino.h>
#define EXCLUDE_WIFI
Expand Down
7 changes: 7 additions & 0 deletions software/firmware/source/SkyWatch/Platform_RP2040.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ static void RP2040_fini()
#if 0 /* TBD */
// back from dormant state
rosc_enable();
#if PICO_SDK_VERSION_MAJOR < 2
clocks_init();
#endif /* PICO_SDK_VERSION_MAJOR */

rp2040.restart();
#endif
Expand Down Expand Up @@ -341,8 +343,13 @@ static float RP2040_Battery_voltage()
uint16_t mV = 0;

#if SOC_GPIO_PIN_BATTERY != SOC_UNUSED_PIN
#if PICO_SDK_VERSION_MAJOR < 2
enum gpio_function pin25_func;
enum gpio_function pin29_func;
#else
gpio_function_t pin25_func;
gpio_function_t pin29_func;
#endif /* PICO_SDK_VERSION_MAJOR */
uint pin25_dir;
uint pin29_dir;

Expand Down
3 changes: 3 additions & 0 deletions software/firmware/source/SkyWatch/Platform_RP2040.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#define Serial_setDebugOutput(x) ({})
#define WIFI_STA_TIMEOUT 20000
extern WebServer server;
#if PICO_SDK_VERSION_MAJOR == 2
#define EXCLUDE_BLUETOOTH
#endif /* PICO_SDK_VERSION_MAJOR */
#else
#include <Arduino.h>
#define EXCLUDE_WIFI
Expand Down
5 changes: 5 additions & 0 deletions software/firmware/source/SoftRF/src/platform/RP2XXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,13 @@ static float RP2xxx_Battery_param(uint8_t param)
uint16_t mV = 0;

#if SOC_GPIO_PIN_BATTERY != SOC_UNUSED_PIN
#if PICO_SDK_VERSION_MAJOR < 2
enum gpio_function pin25_func;
enum gpio_function pin29_func;
#else
gpio_function_t pin25_func;
gpio_function_t pin29_func;
#endif /* PICO_SDK_VERSION_MAJOR */
uint pin25_dir;
uint pin29_dir;

Expand Down
3 changes: 3 additions & 0 deletions software/firmware/source/SoftRF/src/platform/RP2XXX.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ struct rst_info {
#define Serial_setDebugOutput(x) ({})
#define WIFI_STA_TIMEOUT 20000
#define NMEA_TCP_SERVICE
#if PICO_SDK_VERSION_MAJOR == 2
#define EXCLUDE_BLUETOOTH
#endif /* PICO_SDK_VERSION_MAJOR */
/* Experimental */
//#define ENABLE_BT_VOICE
#else
Expand Down

0 comments on commit 4b2fa20

Please sign in to comment.