Skip to content

Commit

Permalink
a fix for build of Pico-PIO-USB library with Pico SDK 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Jan 22, 2025
1 parent 2ea5bef commit 06ba9d6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,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:4.4.2 ;
arduino --install-boards rp2040:rp2040:4.4.1 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "rp2040:rp2040:rpipicow" ]]; then
arduino --pref "custom_freq=rpipicow_120" --save-prefs ;
Expand Down
6 changes: 3 additions & 3 deletions software/firmware/source/SkyView/Platform_RP2XXX.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ enum RP2xxx_board_id {
//#define USE_EXT_I2S_DAC
#endif /* EXCLUDE_AUDIO */
#if defined(USE_TINYUSB) // && !defined(USE_EXT_I2S_DAC)
//#if !defined(PICO_RP2350)
//#define USE_USB_HOST
//#endif /* PICO_RP2350 */
#if !defined(PICO_RP2350)
#define USE_USB_HOST
#endif /* PICO_RP2350 */
#endif /* USE_TINYUSB */

#endif /* PLATFORM_RP2XXX_H */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,13 @@ flip:
% c-sdk {
#include "hardware/clocks.h"

#if PICO_SDK_VERSION_MAJOR < 2
static __always_inline void pio_sm_set_jmp_pin(PIO pio, uint sm, uint jmp_pin) {
pio->sm[sm].execctrl =
(pio->sm[sm].execctrl & ~PIO_SM0_EXECCTRL_JMP_PIN_BITS) |
(jmp_pin << PIO_SM0_EXECCTRL_JMP_PIN_LSB);
}
#endif

static inline void usb_rx_fs_program_init(PIO pio, uint sm, uint offset, uint pin_dp, uint pin_dm, int pin_debug) {
if (pin_dp < pin_dm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,13 @@ static inline pio_sm_config usb_nrzi_decoder_debug_program_get_default_config(ui
}

#include "hardware/clocks.h"
#if PICO_SDK_VERSION_MAJOR < 2
static __always_inline void pio_sm_set_jmp_pin(PIO pio, uint sm, uint jmp_pin) {
pio->sm[sm].execctrl =
(pio->sm[sm].execctrl & ~PIO_SM0_EXECCTRL_JMP_PIN_BITS) |
(jmp_pin << PIO_SM0_EXECCTRL_JMP_PIN_LSB);
}
#endif
static inline void usb_rx_fs_program_init(PIO pio, uint sm, uint offset, uint pin_dp, uint pin_dm, int pin_debug) {
if (pin_dp < pin_dm) {
pio_sm_set_consecutive_pindirs(pio, sm, pin_dp, 2, false);
Expand Down

0 comments on commit 06ba9d6

Please sign in to comment.