Skip to content

Commit

Permalink
Fix for pico sdk 2.0.0 build failing (RP2350 support)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Sep 5, 2024
1 parent 5081d85 commit 72c9a0b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/lgfx/v1/platforms/rp2040/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ Porting for RP2040:
#include <hardware/i2c.h>


#if __has_include("hardware_structs/include/hardware/structs/iobank0.h")
#if PICO_SDK_VERSION_MAJOR<2
// NOTE: old pico sdk (before rp2350) used enum type for gpio function, iobank was named differently too
#define gpio_function_t enum gpio_function
#define io_bank0_hw_t iobank0_hw_t
#elif ! __has_include("hardware/regs/io_bank0.h")
// expecting gpio_function_t and io_bank0_hw_t
#error "Unsupported pico sdk version, can't find io_bank0.h or iobank0.h to use gpio_function_t and io_bank0_hw_t"
#endif

// #define DEBUG
Expand Down

0 comments on commit 72c9a0b

Please sign in to comment.