mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-23 18:49:01 +08:00
Move ARCH_RP2040 --> ARCH_PICOSDK
This commit is contained in:
parent
7844d84798
commit
58327a1753
@ -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
|
@ -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
|
@ -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
|
@ -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
|
1
examples/pico-sdk/pico-w5500
Symbolic link
1
examples/pico-sdk/pico-w5500
Symbolic link
@ -0,0 +1 @@
|
||||
w5500-evb-pico-picosdk-builtin
|
@ -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
|
1
examples/rp2040
Symbolic link
1
examples/rp2040
Symbolic link
@ -0,0 +1 @@
|
||||
pico-sdk
|
@ -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
|
||||
|
@ -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 <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.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
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#if MG_ARCH == MG_ARCH_RP2040
|
||||
#if MG_ARCH == MG_ARCH_PICOSDK
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user