rp2/boards/RPI_PICO2_W: Add RISCV variant for Pico 2 W.
Build with:
make BOARD=RPI_PICO2_W BOARD_VARIANT=RISCV
Signed-off-by: Peter Harper <peter.harper@raspberrypi.com>
This commit is contained in:
parent
1b611dab03
commit
a70a90ccfc
3 changed files with 5 additions and 1 deletions
|
|
@ -407,7 +407,6 @@ if (MICROPY_PY_NETWORK_CYW43)
|
|||
|
||||
target_link_libraries(${MICROPY_TARGET}
|
||||
cyw43_driver_picow
|
||||
cmsis_core
|
||||
)
|
||||
target_include_directories(${MICROPY_TARGET} PRIVATE
|
||||
${MICROPY_DIR}/lib/cyw43-driver/
|
||||
|
|
|
|||
1
ports/rp2/boards/RPI_PICO2_W/mpconfigvariant_RISCV.cmake
Normal file
1
ports/rp2/boards/RPI_PICO2_W/mpconfigvariant_RISCV.cmake
Normal file
|
|
@ -0,0 +1 @@
|
|||
set(PICO_PLATFORM "rp2350-riscv")
|
||||
|
|
@ -44,6 +44,7 @@ static soft_timer_entry_t mp_network_soft_timer;
|
|||
#include "lib/cyw43-driver/src/cyw43_stats.h"
|
||||
#include "hardware/irq.h"
|
||||
|
||||
#if !defined(__riscv)
|
||||
#if PICO_RP2040
|
||||
#include "RP2040.h" // cmsis, for NVIC_SetPriority and PendSV_IRQn
|
||||
#elif PICO_RP2350
|
||||
|
|
@ -51,6 +52,7 @@ static soft_timer_entry_t mp_network_soft_timer;
|
|||
#else
|
||||
#error Unknown processor
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CYW43_IRQ_LEVEL GPIO_IRQ_LEVEL_HIGH
|
||||
#define CYW43_SHARED_IRQ_HANDLER_PRIORITY PICO_SHARED_IRQ_HANDLER_HIGHEST_ORDER_PRIORITY
|
||||
|
|
@ -74,7 +76,9 @@ static void gpio_irq_handler(void) {
|
|||
void cyw43_irq_init(void) {
|
||||
gpio_add_raw_irq_handler_with_order_priority(CYW43_PIN_WL_HOST_WAKE, gpio_irq_handler, CYW43_SHARED_IRQ_HANDLER_PRIORITY);
|
||||
irq_set_enabled(IO_IRQ_BANK0, true);
|
||||
#if !defined(__riscv)
|
||||
NVIC_SetPriority(PendSV_IRQn, IRQ_PRI_PENDSV);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cyw43_post_poll_hook(void) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue