diff --git a/examples/rp2040/pico-rmii/CMakeLists.txt b/examples/pico-sdk/pico-rmii/CMakeLists.txt similarity index 100% rename from examples/rp2040/pico-rmii/CMakeLists.txt rename to examples/pico-sdk/pico-rmii/CMakeLists.txt diff --git a/examples/rp2040/pico-rmii/Makefile b/examples/pico-sdk/pico-rmii/Makefile similarity index 100% rename from examples/rp2040/pico-rmii/Makefile rename to examples/pico-sdk/pico-rmii/Makefile diff --git a/examples/rp2040/pico-rmii/README.md b/examples/pico-sdk/pico-rmii/README.md similarity index 100% rename from examples/rp2040/pico-rmii/README.md rename to examples/pico-sdk/pico-rmii/README.md diff --git a/examples/rp2040/pico-rmii/driver_rp2040_rmii.c b/examples/pico-sdk/pico-rmii/driver_rp2040_rmii.c similarity index 100% rename from examples/rp2040/pico-rmii/driver_rp2040_rmii.c rename to examples/pico-sdk/pico-rmii/driver_rp2040_rmii.c diff --git a/examples/rp2040/pico-rmii/driver_rp2040_rmii.h b/examples/pico-sdk/pico-rmii/driver_rp2040_rmii.h similarity index 100% rename from examples/rp2040/pico-rmii/driver_rp2040_rmii.h rename to examples/pico-sdk/pico-rmii/driver_rp2040_rmii.h diff --git a/examples/rp2040/pico-rmii/main.c b/examples/pico-sdk/pico-rmii/main.c similarity index 100% rename from examples/rp2040/pico-rmii/main.c rename to examples/pico-sdk/pico-rmii/main.c diff --git a/examples/rp2040/pico-rmii/mongoose.c b/examples/pico-sdk/pico-rmii/mongoose.c similarity index 100% rename from examples/rp2040/pico-rmii/mongoose.c rename to examples/pico-sdk/pico-rmii/mongoose.c diff --git a/examples/rp2040/pico-rmii/mongoose.h b/examples/pico-sdk/pico-rmii/mongoose.h similarity index 100% rename from examples/rp2040/pico-rmii/mongoose.h rename to examples/pico-sdk/pico-rmii/mongoose.h diff --git a/examples/rp2040/pico-rmii/mongoose_config.h b/examples/pico-sdk/pico-rmii/mongoose_config.h similarity index 74% rename from examples/rp2040/pico-rmii/mongoose_config.h rename to examples/pico-sdk/pico-rmii/mongoose_config.h index 25ac94af..2c88e5c6 100644 --- a/examples/rp2040/pico-rmii/mongoose_config.h +++ b/examples/pico-sdk/pico-rmii/mongoose_config.h @@ -1,4 +1,4 @@ -#define MG_ARCH MG_ARCH_RP2040 +#define MG_ARCH MG_ARCH_PICOSDK #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_TCPIP_DRIVER_INIT 0 diff --git a/examples/rp2040/pico-rndis-dashboard/CMakeLists.txt b/examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/CMakeLists.txt rename to examples/pico-sdk/pico-rndis-dashboard/CMakeLists.txt diff --git a/examples/rp2040/pico-rndis-dashboard/Makefile b/examples/pico-sdk/pico-rndis-dashboard/Makefile similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/Makefile rename to examples/pico-sdk/pico-rndis-dashboard/Makefile diff --git a/examples/rp2040/pico-rndis-dashboard/README.md b/examples/pico-sdk/pico-rndis-dashboard/README.md similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/README.md rename to examples/pico-sdk/pico-rndis-dashboard/README.md diff --git a/examples/rp2040/pico-rndis-dashboard/main.c b/examples/pico-sdk/pico-rndis-dashboard/main.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/main.c rename to examples/pico-sdk/pico-rndis-dashboard/main.c diff --git a/examples/rp2040/pico-rndis-dashboard/mongoose.c b/examples/pico-sdk/pico-rndis-dashboard/mongoose.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/mongoose.c rename to examples/pico-sdk/pico-rndis-dashboard/mongoose.c diff --git a/examples/rp2040/pico-rndis-dashboard/mongoose.h b/examples/pico-sdk/pico-rndis-dashboard/mongoose.h similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/mongoose.h rename to examples/pico-sdk/pico-rndis-dashboard/mongoose.h diff --git a/examples/rp2040/pico-rndis-dashboard/mongoose_config.h b/examples/pico-sdk/pico-rndis-dashboard/mongoose_config.h similarity index 79% rename from examples/rp2040/pico-rndis-dashboard/mongoose_config.h rename to examples/pico-sdk/pico-rndis-dashboard/mongoose_config.h index 85fdf388..0710b601 100644 --- a/examples/rp2040/pico-rndis-dashboard/mongoose_config.h +++ b/examples/pico-sdk/pico-rndis-dashboard/mongoose_config.h @@ -1,4 +1,4 @@ -#define MG_ARCH MG_ARCH_RP2040 +#define MG_ARCH MG_ARCH_PICOSDK #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_TCPIP_DRIVER_INIT 0 diff --git a/examples/rp2040/pico-rndis-dashboard/msc_disk.c b/examples/pico-sdk/pico-rndis-dashboard/msc_disk.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/msc_disk.c rename to examples/pico-sdk/pico-rndis-dashboard/msc_disk.c diff --git a/examples/rp2040/pico-rndis-dashboard/net.c b/examples/pico-sdk/pico-rndis-dashboard/net.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/net.c rename to examples/pico-sdk/pico-rndis-dashboard/net.c diff --git a/examples/rp2040/pico-rndis-dashboard/net.h b/examples/pico-sdk/pico-rndis-dashboard/net.h similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/net.h rename to examples/pico-sdk/pico-rndis-dashboard/net.h diff --git a/examples/rp2040/pico-rndis-dashboard/netif/ethernet.h b/examples/pico-sdk/pico-rndis-dashboard/netif/ethernet.h similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/netif/ethernet.h rename to examples/pico-sdk/pico-rndis-dashboard/netif/ethernet.h diff --git a/examples/rp2040/pico-rndis-dashboard/packed_fs.c b/examples/pico-sdk/pico-rndis-dashboard/packed_fs.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/packed_fs.c rename to examples/pico-sdk/pico-rndis-dashboard/packed_fs.c diff --git a/examples/rp2040/pico-rndis-dashboard/tusb_config.h b/examples/pico-sdk/pico-rndis-dashboard/tusb_config.h similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/tusb_config.h rename to examples/pico-sdk/pico-rndis-dashboard/tusb_config.h diff --git a/examples/rp2040/pico-rndis-dashboard/usb_descriptors.c b/examples/pico-sdk/pico-rndis-dashboard/usb_descriptors.c similarity index 100% rename from examples/rp2040/pico-rndis-dashboard/usb_descriptors.c rename to examples/pico-sdk/pico-rndis-dashboard/usb_descriptors.c diff --git a/examples/rp2040/pico-rndis-device/CMakeLists.txt b/examples/pico-sdk/pico-rndis-device/CMakeLists.txt similarity index 100% rename from examples/rp2040/pico-rndis-device/CMakeLists.txt rename to examples/pico-sdk/pico-rndis-device/CMakeLists.txt diff --git a/examples/rp2040/pico-rndis-device/Makefile b/examples/pico-sdk/pico-rndis-device/Makefile similarity index 100% rename from examples/rp2040/pico-rndis-device/Makefile rename to examples/pico-sdk/pico-rndis-device/Makefile diff --git a/examples/rp2040/pico-rndis-device/README.md b/examples/pico-sdk/pico-rndis-device/README.md similarity index 100% rename from examples/rp2040/pico-rndis-device/README.md rename to examples/pico-sdk/pico-rndis-device/README.md diff --git a/examples/rp2040/pico-rndis-device/hal.h b/examples/pico-sdk/pico-rndis-device/hal.h similarity index 100% rename from examples/rp2040/pico-rndis-device/hal.h rename to examples/pico-sdk/pico-rndis-device/hal.h diff --git a/examples/rp2040/pico-rndis-device/main.c b/examples/pico-sdk/pico-rndis-device/main.c similarity index 100% rename from examples/rp2040/pico-rndis-device/main.c rename to examples/pico-sdk/pico-rndis-device/main.c diff --git a/examples/rp2040/pico-rndis-device/mongoose.c b/examples/pico-sdk/pico-rndis-device/mongoose.c similarity index 100% rename from examples/rp2040/pico-rndis-device/mongoose.c rename to examples/pico-sdk/pico-rndis-device/mongoose.c diff --git a/examples/rp2040/pico-rndis-device/mongoose.h b/examples/pico-sdk/pico-rndis-device/mongoose.h similarity index 100% rename from examples/rp2040/pico-rndis-device/mongoose.h rename to examples/pico-sdk/pico-rndis-device/mongoose.h diff --git a/examples/rp2040/pico-rndis-device/mongoose_config.h b/examples/pico-sdk/pico-rndis-device/mongoose_config.h similarity index 79% rename from examples/rp2040/pico-rndis-device/mongoose_config.h rename to examples/pico-sdk/pico-rndis-device/mongoose_config.h index 85fdf388..0710b601 100644 --- a/examples/rp2040/pico-rndis-device/mongoose_config.h +++ b/examples/pico-sdk/pico-rndis-device/mongoose_config.h @@ -1,4 +1,4 @@ -#define MG_ARCH MG_ARCH_RP2040 +#define MG_ARCH MG_ARCH_PICOSDK #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_TCPIP_DRIVER_INIT 0 diff --git a/examples/rp2040/pico-rndis-device/net.c b/examples/pico-sdk/pico-rndis-device/net.c similarity index 100% rename from examples/rp2040/pico-rndis-device/net.c rename to examples/pico-sdk/pico-rndis-device/net.c diff --git a/examples/rp2040/pico-rndis-device/net.h b/examples/pico-sdk/pico-rndis-device/net.h similarity index 100% rename from examples/rp2040/pico-rndis-device/net.h rename to examples/pico-sdk/pico-rndis-device/net.h diff --git a/examples/rp2040/pico-rndis-device/netif/ethernet.h b/examples/pico-sdk/pico-rndis-device/netif/ethernet.h similarity index 100% rename from examples/rp2040/pico-rndis-device/netif/ethernet.h rename to examples/pico-sdk/pico-rndis-device/netif/ethernet.h diff --git a/examples/rp2040/pico-rndis-device/tusb_config.h b/examples/pico-sdk/pico-rndis-device/tusb_config.h similarity index 100% rename from examples/rp2040/pico-rndis-device/tusb_config.h rename to examples/pico-sdk/pico-rndis-device/tusb_config.h diff --git a/examples/rp2040/pico-rndis-device/usb_descriptors.c b/examples/pico-sdk/pico-rndis-device/usb_descriptors.c similarity index 100% rename from examples/rp2040/pico-rndis-device/usb_descriptors.c rename to examples/pico-sdk/pico-rndis-device/usb_descriptors.c diff --git a/examples/rp2040/pico-w-sdk-builtin/CMakeLists.txt b/examples/pico-sdk/pico-w-picosdk-builtin/CMakeLists.txt similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/CMakeLists.txt rename to examples/pico-sdk/pico-w-picosdk-builtin/CMakeLists.txt diff --git a/examples/rp2040/pico-w-sdk-builtin/Makefile b/examples/pico-sdk/pico-w-picosdk-builtin/Makefile similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/Makefile rename to examples/pico-sdk/pico-w-picosdk-builtin/Makefile diff --git a/examples/rp2040/pico-w-sdk-builtin/README.md b/examples/pico-sdk/pico-w-picosdk-builtin/README.md similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/README.md rename to examples/pico-sdk/pico-w-picosdk-builtin/README.md diff --git a/examples/rp2040/pico-w-sdk-builtin/cyw43_configport.h b/examples/pico-sdk/pico-w-picosdk-builtin/cyw43_configport.h similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/cyw43_configport.h rename to examples/pico-sdk/pico-w-picosdk-builtin/cyw43_configport.h diff --git a/examples/rp2040/pico-w-sdk-builtin/driver_pico-w.c b/examples/pico-sdk/pico-w-picosdk-builtin/driver_pico-w.c similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/driver_pico-w.c rename to examples/pico-sdk/pico-w-picosdk-builtin/driver_pico-w.c diff --git a/examples/rp2040/pico-w-sdk-builtin/driver_pico-w.h b/examples/pico-sdk/pico-w-picosdk-builtin/driver_pico-w.h similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/driver_pico-w.h rename to examples/pico-sdk/pico-w-picosdk-builtin/driver_pico-w.h diff --git a/examples/rp2040/pico-w-sdk-builtin/main.c b/examples/pico-sdk/pico-w-picosdk-builtin/main.c similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/main.c rename to examples/pico-sdk/pico-w-picosdk-builtin/main.c diff --git a/examples/rp2040/pico-w-sdk-builtin/mongoose.c b/examples/pico-sdk/pico-w-picosdk-builtin/mongoose.c similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/mongoose.c rename to examples/pico-sdk/pico-w-picosdk-builtin/mongoose.c diff --git a/examples/rp2040/pico-w-sdk-builtin/mongoose.h b/examples/pico-sdk/pico-w-picosdk-builtin/mongoose.h similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/mongoose.h rename to examples/pico-sdk/pico-w-picosdk-builtin/mongoose.h diff --git a/examples/rp2040/pico-w-sdk-builtin/mongoose_config.h b/examples/pico-sdk/pico-w-picosdk-builtin/mongoose_config.h similarity index 74% rename from examples/rp2040/pico-w-sdk-builtin/mongoose_config.h rename to examples/pico-sdk/pico-w-picosdk-builtin/mongoose_config.h index 25ac94af..2c88e5c6 100644 --- a/examples/rp2040/pico-w-sdk-builtin/mongoose_config.h +++ b/examples/pico-sdk/pico-w-picosdk-builtin/mongoose_config.h @@ -1,4 +1,4 @@ -#define MG_ARCH MG_ARCH_RP2040 +#define MG_ARCH MG_ARCH_PICOSDK #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_TCPIP_DRIVER_INIT 0 diff --git a/examples/rp2040/pico-w-sdk-builtin/net.c b/examples/pico-sdk/pico-w-picosdk-builtin/net.c similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/net.c rename to examples/pico-sdk/pico-w-picosdk-builtin/net.c diff --git a/examples/rp2040/pico-w-sdk-builtin/net.h b/examples/pico-sdk/pico-w-picosdk-builtin/net.h similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/net.h rename to examples/pico-sdk/pico-w-picosdk-builtin/net.h diff --git a/examples/rp2040/pico-w-sdk-builtin/packed_fs.c b/examples/pico-sdk/pico-w-picosdk-builtin/packed_fs.c similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/packed_fs.c rename to examples/pico-sdk/pico-w-picosdk-builtin/packed_fs.c diff --git a/examples/rp2040/pico-w-sdk-builtin/pico_sdk_import.cmake b/examples/pico-sdk/pico-w-picosdk-builtin/pico_sdk_import.cmake similarity index 100% rename from examples/rp2040/pico-w-sdk-builtin/pico_sdk_import.cmake rename to examples/pico-sdk/pico-w-picosdk-builtin/pico_sdk_import.cmake diff --git a/examples/rp2040/pico-w/Makefile b/examples/pico-sdk/pico-w/Makefile similarity index 100% rename from examples/rp2040/pico-w/Makefile rename to examples/pico-sdk/pico-w/Makefile diff --git a/examples/rp2040/pico-w/README.md b/examples/pico-sdk/pico-w/README.md similarity index 100% rename from examples/rp2040/pico-w/README.md rename to examples/pico-sdk/pico-w/README.md diff --git a/examples/pico-sdk/pico-w5500 b/examples/pico-sdk/pico-w5500 new file mode 120000 index 00000000..5c3e5172 --- /dev/null +++ b/examples/pico-sdk/pico-w5500 @@ -0,0 +1 @@ +w5500-evb-pico-picosdk-builtin \ No newline at end of file diff --git a/examples/rp2040/pico-w5500/CMakeLists.txt b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/CMakeLists.txt similarity index 100% rename from examples/rp2040/pico-w5500/CMakeLists.txt rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/CMakeLists.txt diff --git a/examples/rp2040/pico-w5500/Makefile b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/Makefile similarity index 100% rename from examples/rp2040/pico-w5500/Makefile rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/Makefile diff --git a/examples/rp2040/pico-w5500/README.md b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/README.md similarity index 100% rename from examples/rp2040/pico-w5500/README.md rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/README.md diff --git a/examples/rp2040/pico-w5500/main.c b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/main.c similarity index 100% rename from examples/rp2040/pico-w5500/main.c rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/main.c diff --git a/examples/rp2040/pico-w5500/mongoose.c b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose.c similarity index 100% rename from examples/rp2040/pico-w5500/mongoose.c rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose.c diff --git a/examples/rp2040/pico-w5500/mongoose.h b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose.h similarity index 100% rename from examples/rp2040/pico-w5500/mongoose.h rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose.h diff --git a/examples/rp2040/pico-w5500/mongoose_config.h b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose_config.h similarity index 85% rename from examples/rp2040/pico-w5500/mongoose_config.h rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose_config.h index 122f2857..f1edd1ec 100644 --- a/examples/rp2040/pico-w5500/mongoose_config.h +++ b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/mongoose_config.h @@ -1,4 +1,4 @@ -#define MG_ARCH MG_ARCH_RP2040 +#define MG_ARCH MG_ARCH_PICOSDK #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_TCPIP_DRIVER_INIT 0 diff --git a/examples/rp2040/pico-w5500/net.c b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/net.c similarity index 100% rename from examples/rp2040/pico-w5500/net.c rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/net.c diff --git a/examples/rp2040/pico-w5500/net.h b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/net.h similarity index 100% rename from examples/rp2040/pico-w5500/net.h rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/net.h diff --git a/examples/rp2040/pico-w5500/packed_fs.c b/examples/pico-sdk/w5500-evb-pico-picosdk-builtin/packed_fs.c similarity index 100% rename from examples/rp2040/pico-w5500/packed_fs.c rename to examples/pico-sdk/w5500-evb-pico-picosdk-builtin/packed_fs.c diff --git a/examples/rp2040 b/examples/rp2040 new file mode 120000 index 00000000..6520b196 --- /dev/null +++ b/examples/rp2040 @@ -0,0 +1 @@ +pico-sdk \ No newline at end of file diff --git a/mongoose.c b/mongoose.c index 390c64a2..c4ae5f4e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -16824,7 +16824,7 @@ bool mg_random(void *buf, size_t len) { #if MG_ARCH == MG_ARCH_ESP32 while (len--) *p++ = (unsigned char) (esp_random() & 255); success = true; -#elif MG_ARCH == MG_ARCH_RP2040 +#elif MG_ARCH == MG_ARCH_PICOSDK while (len--) *p++ = (unsigned char) (get_rand_32() & 255); success = true; #elif MG_ARCH == MG_ARCH_WIN32 @@ -16963,7 +16963,7 @@ bool mg_path_is_sane(const struct mg_str path) { uint64_t mg_millis(void) { #if MG_ARCH == MG_ARCH_WIN32 return GetTickCount(); -#elif MG_ARCH == MG_ARCH_RP2040 +#elif MG_ARCH == MG_ARCH_PICOSDK return time_us_64() / 1000; #elif MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || \ MG_ARCH == MG_ARCH_FREERTOS diff --git a/mongoose.h b/mongoose.h index 9dc3fd02..1dd4ffaa 100644 --- a/mongoose.h +++ b/mongoose.h @@ -38,7 +38,7 @@ extern "C" { #define MG_ARCH_NEWLIB 8 // Bare metal ARM #define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX) #define MG_ARCH_TIRTOS 10 // Texas Semi TI-RTOS -#define MG_ARCH_RP2040 11 // Raspberry Pi RP2040 +#define MG_ARCH_PICOSDK 11 // Raspberry Pi Pico-SDK (RP2040, RP2350) #define MG_ARCH_ARMCC 12 // Keil MDK-Core with Configuration Wizard #define MG_ARCH_CMSIS_RTOS2 13 // CMSIS-RTOS API v2 (Keil RTX5, FreeRTOS) #define MG_ARCH_RTTHREAD 14 // RT-Thread RTOS @@ -243,7 +243,7 @@ static inline int mg_mkdir(const char *path, mode_t mode) { #endif -#if MG_ARCH == MG_ARCH_RP2040 +#if MG_ARCH == MG_ARCH_PICOSDK #include #include #include diff --git a/src/arch.h b/src/arch.h index 9f43b751..84188792 100644 --- a/src/arch.h +++ b/src/arch.h @@ -11,7 +11,7 @@ #define MG_ARCH_NEWLIB 8 // Bare metal ARM #define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX) #define MG_ARCH_TIRTOS 10 // Texas Semi TI-RTOS -#define MG_ARCH_RP2040 11 // Raspberry Pi RP2040 +#define MG_ARCH_PICOSDK 11 // Raspberry Pi Pico-SDK (RP2040, RP2350) #define MG_ARCH_ARMCC 12 // Keil MDK-Core with Configuration Wizard #define MG_ARCH_CMSIS_RTOS2 13 // CMSIS-RTOS API v2 (Keil RTX5, FreeRTOS) #define MG_ARCH_RTTHREAD 14 // RT-Thread RTOS diff --git a/src/arch_rp2040.h b/src/arch_picosdk.h similarity index 92% rename from src/arch_rp2040.h rename to src/arch_picosdk.h index c6f70d35..bc263181 100644 --- a/src/arch_rp2040.h +++ b/src/arch_picosdk.h @@ -1,6 +1,6 @@ #pragma once -#if MG_ARCH == MG_ARCH_RP2040 +#if MG_ARCH == MG_ARCH_PICOSDK #include #include #include diff --git a/src/util.c b/src/util.c index 83433758..0f7fa29d 100644 --- a/src/util.c +++ b/src/util.c @@ -17,7 +17,7 @@ bool mg_random(void *buf, size_t len) { #if MG_ARCH == MG_ARCH_ESP32 while (len--) *p++ = (unsigned char) (esp_random() & 255); success = true; -#elif MG_ARCH == MG_ARCH_RP2040 +#elif MG_ARCH == MG_ARCH_PICOSDK while (len--) *p++ = (unsigned char) (get_rand_32() & 255); success = true; #elif MG_ARCH == MG_ARCH_WIN32 @@ -156,7 +156,7 @@ bool mg_path_is_sane(const struct mg_str path) { uint64_t mg_millis(void) { #if MG_ARCH == MG_ARCH_WIN32 return GetTickCount(); -#elif MG_ARCH == MG_ARCH_RP2040 +#elif MG_ARCH == MG_ARCH_PICOSDK return time_us_64() / 1000; #elif MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || \ MG_ARCH == MG_ARCH_FREERTOS