all: Rename UMODULE to MODULE in preprocessor/Makefile vars.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared 2022-08-18 15:01:26 +10:00
parent 7f5d5c7271
commit f5f9edf645
126 changed files with 563 additions and 563 deletions

View File

@ -24,7 +24,7 @@ This module implements a pseudo-random number generator (PRNG).
.. note:: .. note::
The :func:`randrange`, :func:`randint` and :func:`choice` functions are only The :func:`randrange`, :func:`randint` and :func:`choice` functions are only
available if the ``MICROPY_PY_URANDOM_EXTRA_FUNCS`` configuration option is available if the ``MICROPY_PY_RANDOM_EXTRA_FUNCS`` configuration option is
enabled. enabled.
@ -73,7 +73,7 @@ Other Functions
supported by the port) initialise the PRNG with a true random number supported by the port) initialise the PRNG with a true random number
(usually a hardware generated random number). (usually a hardware generated random number).
The ``None`` case only works if ``MICROPY_PY_URANDOM_SEED_INIT_FUNC`` is The ``None`` case only works if ``MICROPY_PY_RANDOM_SEED_INIT_FUNC`` is
enabled by the port, otherwise it raises ``ValueError``. enabled by the port, otherwise it raises ``ValueError``.
.. function:: choice(sequence) .. function:: choice(sequence)

View File

@ -1,4 +1,4 @@
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#include "py/dynruntime.h" #include "py/dynruntime.h"

View File

@ -1,5 +1,5 @@
#define MICROPY_PY_URANDOM (1) #define MICROPY_PY_RANDOM (1)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) #define MICROPY_PY_RANDOM_EXTRA_FUNCS (1)
#include "py/dynruntime.h" #include "py/dynruntime.h"
@ -19,7 +19,7 @@ mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *a
mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_random)); mp_store_global(MP_QSTR___name__, MP_OBJ_NEW_QSTR(MP_QSTR_random));
mp_store_global(MP_QSTR_getrandbits, MP_OBJ_FROM_PTR(&mod_random_getrandbits_obj)); mp_store_global(MP_QSTR_getrandbits, MP_OBJ_FROM_PTR(&mod_random_getrandbits_obj));
mp_store_global(MP_QSTR_seed, MP_OBJ_FROM_PTR(&mod_random_seed_obj)); mp_store_global(MP_QSTR_seed, MP_OBJ_FROM_PTR(&mod_random_seed_obj));
#if MICROPY_PY_URANDOM_EXTRA_FUNCS #if MICROPY_PY_RANDOM_EXTRA_FUNCS
mp_store_global(MP_QSTR_randrange, MP_OBJ_FROM_PTR(&mod_random_randrange_obj)); mp_store_global(MP_QSTR_randrange, MP_OBJ_FROM_PTR(&mod_random_randrange_obj));
mp_store_global(MP_QSTR_randint, MP_OBJ_FROM_PTR(&mod_random_randint_obj)); mp_store_global(MP_QSTR_randint, MP_OBJ_FROM_PTR(&mod_random_randint_obj));
mp_store_global(MP_QSTR_choice, MP_OBJ_FROM_PTR(&mod_random_choice_obj)); mp_store_global(MP_QSTR_choice, MP_OBJ_FROM_PTR(&mod_random_choice_obj));

View File

@ -1,8 +1,8 @@
#define MICROPY_STACK_CHECK (1) #define MICROPY_STACK_CHECK (1)
#define MICROPY_PY_URE (1) #define MICROPY_PY_RE (1)
#define MICROPY_PY_URE_MATCH_GROUPS (1) #define MICROPY_PY_RE_MATCH_GROUPS (1)
#define MICROPY_PY_URE_MATCH_SPAN_START_END (1) #define MICROPY_PY_RE_MATCH_SPAN_START_END (1)
#define MICROPY_PY_URE_SUB (0) // requires vstr interface #define MICROPY_PY_RE_SUB (0) // requires vstr interface
#include <alloca.h> #include <alloca.h>
#include "py/dynruntime.h" #include "py/dynruntime.h"

View File

@ -1,4 +1,4 @@
#define MICROPY_PY_UZLIB (1) #define MICROPY_PY_ZLIB (1)
#include "py/dynruntime.h" #include "py/dynruntime.h"

View File

@ -108,8 +108,8 @@ endif
################################################################################ ################################################################################
# ussl # ussl
ifeq ($(MICROPY_PY_USSL),1) ifeq ($(MICROPY_PY_SSL),1)
CFLAGS_EXTMOD += -DMICROPY_PY_USSL=1 CFLAGS_EXTMOD += -DMICROPY_PY_SSL=1
ifeq ($(MICROPY_SSL_AXTLS),1) ifeq ($(MICROPY_SSL_AXTLS),1)
AXTLS_DIR = lib/axtls AXTLS_DIR = lib/axtls
GIT_SUBMODULES += $(AXTLS_DIR) GIT_SUBMODULES += $(AXTLS_DIR)

View File

@ -918,7 +918,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(lwip_socket_bind_obj, lwip_socket_bind);
STATIC mp_obj_t lwip_socket_listen(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t lwip_socket_listen(size_t n_args, const mp_obj_t *args) {
lwip_socket_obj_t *socket = MP_OBJ_TO_PTR(args[0]); lwip_socket_obj_t *socket = MP_OBJ_TO_PTR(args[0]);
mp_int_t backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT; mp_int_t backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
if (n_args > 1) { if (n_args > 1) {
backlog = mp_obj_get_int(args[1]); backlog = mp_obj_get_int(args[1]);
backlog = (backlog < 0) ? 0 : backlog; backlog = (backlog < 0) ? 0 : backlog;

View File

@ -101,7 +101,7 @@ typedef struct _mod_network_socket_obj_t {
int32_t timeout; int32_t timeout;
mp_obj_t callback; mp_obj_t callback;
int32_t state : 8; int32_t state : 8;
#if MICROPY_PY_USOCKET_EXTENDED_STATE #if MICROPY_PY_SOCKET_EXTENDED_STATE
// Extended socket state for NICs/ports that need it. // Extended socket state for NICs/ports that need it.
void *_private; void *_private;
#endif #endif

View File

@ -64,14 +64,14 @@ STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, si
// Ticks for task ordering in pairing heap // Ticks for task ordering in pairing heap
STATIC mp_obj_t ticks(void) { STATIC mp_obj_t ticks(void) {
return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & (MICROPY_PY_TIME_TICKS_PERIOD - 1));
} }
STATIC mp_int_t ticks_diff(mp_obj_t t1_in, mp_obj_t t0_in) { STATIC mp_int_t ticks_diff(mp_obj_t t1_in, mp_obj_t t0_in) {
mp_uint_t t0 = MP_OBJ_SMALL_INT_VALUE(t0_in); mp_uint_t t0 = MP_OBJ_SMALL_INT_VALUE(t0_in);
mp_uint_t t1 = MP_OBJ_SMALL_INT_VALUE(t1_in); mp_uint_t t1 = MP_OBJ_SMALL_INT_VALUE(t1_in);
mp_int_t diff = ((t1 - t0 + MICROPY_PY_UTIME_TICKS_PERIOD / 2) & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)) mp_int_t diff = ((t1 - t0 + MICROPY_PY_TIME_TICKS_PERIOD / 2) & (MICROPY_PY_TIME_TICKS_PERIOD - 1))
- MICROPY_PY_UTIME_TICKS_PERIOD / 2; - MICROPY_PY_TIME_TICKS_PERIOD / 2;
return diff; return diff;
} }

View File

@ -32,7 +32,7 @@
#include "py/binary.h" #include "py/binary.h"
#include "py/objstr.h" #include "py/objstr.h"
#if MICROPY_PY_UBINASCII #if MICROPY_PY_BINASCII
#if MICROPY_PY_BUILTINS_BYTES_HEX #if MICROPY_PY_BUILTINS_BYTES_HEX
STATIC mp_obj_t bytes_hex_as_bytes(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t bytes_hex_as_bytes(size_t n_args, const mp_obj_t *args) {
@ -170,7 +170,7 @@ STATIC mp_obj_t mod_binascii_b2a_base64(size_t n_args, const mp_obj_t *pos_args,
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_binascii_b2a_base64_obj, 1, mod_binascii_b2a_base64); STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mod_binascii_b2a_base64_obj, 1, mod_binascii_b2a_base64);
#if MICROPY_PY_UBINASCII_CRC32 #if MICROPY_PY_BINASCII_CRC32
#include "lib/uzlib/tinf.h" #include "lib/uzlib/tinf.h"
STATIC mp_obj_t mod_binascii_crc32(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_binascii_crc32(size_t n_args, const mp_obj_t *args) {
@ -191,7 +191,7 @@ STATIC const mp_rom_map_elem_t mp_module_binascii_globals_table[] = {
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_a2b_base64), MP_ROM_PTR(&mod_binascii_a2b_base64_obj) }, { MP_ROM_QSTR(MP_QSTR_a2b_base64), MP_ROM_PTR(&mod_binascii_a2b_base64_obj) },
{ MP_ROM_QSTR(MP_QSTR_b2a_base64), MP_ROM_PTR(&mod_binascii_b2a_base64_obj) }, { MP_ROM_QSTR(MP_QSTR_b2a_base64), MP_ROM_PTR(&mod_binascii_b2a_base64_obj) },
#if MICROPY_PY_UBINASCII_CRC32 #if MICROPY_PY_BINASCII_CRC32
{ MP_ROM_QSTR(MP_QSTR_crc32), MP_ROM_PTR(&mod_binascii_crc32_obj) }, { MP_ROM_QSTR(MP_QSTR_crc32), MP_ROM_PTR(&mod_binascii_crc32_obj) },
#endif #endif
}; };
@ -205,4 +205,4 @@ const mp_obj_module_t mp_module_binascii = {
MP_REGISTER_MODULE(MP_QSTR_binascii, mp_module_binascii); MP_REGISTER_MODULE(MP_QSTR_binascii, mp_module_binascii);
#endif // MICROPY_PY_UBINASCII #endif // MICROPY_PY_BINASCII

View File

@ -27,7 +27,7 @@
#include "py/mpconfig.h" #include "py/mpconfig.h"
#if MICROPY_PY_UCRYPTOLIB #if MICROPY_PY_CRYPTOLIB
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
@ -90,7 +90,7 @@ typedef struct _mp_obj_aes_t {
} mp_obj_aes_t; } mp_obj_aes_t;
static inline bool is_ctr_mode(int block_mode) { static inline bool is_ctr_mode(int block_mode) {
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
return block_mode == UCRYPTOLIB_MODE_CTR; return block_mode == UCRYPTOLIB_MODE_CTR;
#else #else
return false; return false;
@ -140,7 +140,7 @@ STATIC void aes_process_cbc_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *
} }
} }
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
// axTLS doesn't have CTR support out of the box. This implements the counter part using the ECB primitive. // axTLS doesn't have CTR support out of the box. This implements the counter part using the ECB primitive.
STATIC void aes_process_ctr_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, struct ctr_params *ctr_params) { STATIC void aes_process_ctr_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, struct ctr_params *ctr_params) {
size_t n = ctr_params->offset; size_t n = ctr_params->offset;
@ -203,7 +203,7 @@ STATIC void aes_process_cbc_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *
mbedtls_aes_crypt_cbc(&ctx->u.mbedtls_ctx, encrypt ? MBEDTLS_AES_ENCRYPT : MBEDTLS_AES_DECRYPT, in_len, ctx->iv, in, out); mbedtls_aes_crypt_cbc(&ctx->u.mbedtls_ctx, encrypt ? MBEDTLS_AES_ENCRYPT : MBEDTLS_AES_DECRYPT, in_len, ctx->iv, in, out);
} }
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
STATIC void aes_process_ctr_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, struct ctr_params *ctr_params) { STATIC void aes_process_ctr_impl(AES_CTX_IMPL *ctx, const uint8_t *in, uint8_t *out, size_t in_len, struct ctr_params *ctr_params) {
mbedtls_aes_crypt_ctr(&ctx->u.mbedtls_ctx, in_len, &ctr_params->offset, ctx->iv, ctr_params->encrypted_counter, in, out); mbedtls_aes_crypt_ctr(&ctx->u.mbedtls_ctx, in_len, &ctr_params->offset, ctx->iv, ctr_params->encrypted_counter, in, out);
} }
@ -219,7 +219,7 @@ STATIC mp_obj_t cryptolib_aes_make_new(const mp_obj_type_t *type, size_t n_args,
switch (block_mode) { switch (block_mode) {
case UCRYPTOLIB_MODE_ECB: case UCRYPTOLIB_MODE_ECB:
case UCRYPTOLIB_MODE_CBC: case UCRYPTOLIB_MODE_CBC:
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
case UCRYPTOLIB_MODE_CTR: case UCRYPTOLIB_MODE_CTR:
#endif #endif
break; break;
@ -318,7 +318,7 @@ STATIC mp_obj_t aes_process(size_t n_args, const mp_obj_t *args, bool encrypt) {
aes_process_cbc_impl(&self->ctx, in_bufinfo.buf, out_buf_ptr, in_bufinfo.len, encrypt); aes_process_cbc_impl(&self->ctx, in_bufinfo.buf, out_buf_ptr, in_bufinfo.len, encrypt);
break; break;
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
case UCRYPTOLIB_MODE_CTR: case UCRYPTOLIB_MODE_CTR:
aes_process_ctr_impl(&self->ctx, in_bufinfo.buf, out_buf_ptr, in_bufinfo.len, aes_process_ctr_impl(&self->ctx, in_bufinfo.buf, out_buf_ptr, in_bufinfo.len,
ctr_params_from_aes(self)); ctr_params_from_aes(self));
@ -359,10 +359,10 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
STATIC const mp_rom_map_elem_t mp_module_cryptolib_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_cryptolib_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_cryptolib) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_cryptolib) },
{ MP_ROM_QSTR(MP_QSTR_aes), MP_ROM_PTR(&cryptolib_aes_type) }, { MP_ROM_QSTR(MP_QSTR_aes), MP_ROM_PTR(&cryptolib_aes_type) },
#if MICROPY_PY_UCRYPTOLIB_CONSTS #if MICROPY_PY_CRYPTOLIB_CONSTS
{ MP_ROM_QSTR(MP_QSTR_MODE_ECB), MP_ROM_INT(UCRYPTOLIB_MODE_ECB) }, { MP_ROM_QSTR(MP_QSTR_MODE_ECB), MP_ROM_INT(UCRYPTOLIB_MODE_ECB) },
{ MP_ROM_QSTR(MP_QSTR_MODE_CBC), MP_ROM_INT(UCRYPTOLIB_MODE_CBC) }, { MP_ROM_QSTR(MP_QSTR_MODE_CBC), MP_ROM_INT(UCRYPTOLIB_MODE_CBC) },
#if MICROPY_PY_UCRYPTOLIB_CTR #if MICROPY_PY_CRYPTOLIB_CTR
{ MP_ROM_QSTR(MP_QSTR_MODE_CTR), MP_ROM_INT(UCRYPTOLIB_MODE_CTR) }, { MP_ROM_QSTR(MP_QSTR_MODE_CTR), MP_ROM_INT(UCRYPTOLIB_MODE_CTR) },
#endif #endif
#endif #endif
@ -377,4 +377,4 @@ const mp_obj_module_t mp_module_cryptolib = {
MP_REGISTER_MODULE(MP_QSTR_cryptolib, mp_module_cryptolib); MP_REGISTER_MODULE(MP_QSTR_cryptolib, mp_module_cryptolib);
#endif // MICROPY_PY_UCRYPTOLIB #endif // MICROPY_PY_CRYPTOLIB

View File

@ -29,13 +29,13 @@
#include "py/runtime.h" #include "py/runtime.h"
#if MICROPY_PY_UHASHLIB #if MICROPY_PY_HASHLIB
#if MICROPY_SSL_MBEDTLS #if MICROPY_SSL_MBEDTLS
#include "mbedtls/version.h" #include "mbedtls/version.h"
#endif #endif
#if MICROPY_PY_UHASHLIB_SHA256 #if MICROPY_PY_HASHLIB_SHA256
#if MICROPY_SSL_MBEDTLS #if MICROPY_SSL_MBEDTLS
#include "mbedtls/sha256.h" #include "mbedtls/sha256.h"
@ -45,7 +45,7 @@
#endif #endif
#if MICROPY_PY_UHASHLIB_SHA1 || MICROPY_PY_UHASHLIB_MD5 #if MICROPY_PY_HASHLIB_SHA1 || MICROPY_PY_HASHLIB_MD5
#if MICROPY_SSL_AXTLS #if MICROPY_SSL_AXTLS
#include "lib/axtls/crypto/crypto.h" #include "lib/axtls/crypto/crypto.h"
@ -70,7 +70,7 @@ static void hashlib_ensure_not_final(mp_obj_hash_t *self) {
} }
} }
#if MICROPY_PY_UHASHLIB_SHA256 #if MICROPY_PY_HASHLIB_SHA256
STATIC mp_obj_t hashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg); STATIC mp_obj_t hashlib_sha256_update(mp_obj_t self_in, mp_obj_t arg);
#if MICROPY_SSL_MBEDTLS #if MICROPY_SSL_MBEDTLS
@ -161,12 +161,12 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
hashlib_sha256_type, hashlib_sha256_type,
MP_QSTR_sha256, MP_QSTR_sha256,
MP_TYPE_FLAG_NONE, MP_TYPE_FLAG_NONE,
make_new, uhashlib_sha256_make_new, make_new, hashlib_sha256_make_new,
locals_dict, &hashlib_sha256_locals_dict locals_dict, &hashlib_sha256_locals_dict
); );
#endif #endif
#if MICROPY_PY_UHASHLIB_SHA1 #if MICROPY_PY_HASHLIB_SHA1
STATIC mp_obj_t hashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg); STATIC mp_obj_t hashlib_sha1_update(mp_obj_t self_in, mp_obj_t arg);
#if MICROPY_SSL_AXTLS #if MICROPY_SSL_AXTLS
@ -260,7 +260,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
); );
#endif #endif
#if MICROPY_PY_UHASHLIB_MD5 #if MICROPY_PY_HASHLIB_MD5
STATIC mp_obj_t hashlib_md5_update(mp_obj_t self_in, mp_obj_t arg); STATIC mp_obj_t hashlib_md5_update(mp_obj_t self_in, mp_obj_t arg);
#if MICROPY_SSL_AXTLS #if MICROPY_SSL_AXTLS
@ -352,17 +352,17 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE(
make_new, hashlib_md5_make_new, make_new, hashlib_md5_make_new,
locals_dict, &hashlib_md5_locals_dict locals_dict, &hashlib_md5_locals_dict
); );
#endif // MICROPY_PY_UHASHLIB_MD5 #endif // MICROPY_PY_HASHLIB_MD5
STATIC const mp_rom_map_elem_t mp_module_hashlib_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_hashlib_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hashlib) },
#if MICROPY_PY_UHASHLIB_SHA256 #if MICROPY_PY_HASHLIB_SHA256
{ MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&hashlib_sha256_type) }, { MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&hashlib_sha256_type) },
#endif #endif
#if MICROPY_PY_UHASHLIB_SHA1 #if MICROPY_PY_HASHLIB_SHA1
{ MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&hashlib_sha1_type) }, { MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&hashlib_sha1_type) },
#endif #endif
#if MICROPY_PY_UHASHLIB_MD5 #if MICROPY_PY_HASHLIB_MD5
{ MP_ROM_QSTR(MP_QSTR_md5), MP_ROM_PTR(&hashlib_md5_type) }, { MP_ROM_QSTR(MP_QSTR_md5), MP_ROM_PTR(&hashlib_md5_type) },
#endif #endif
}; };
@ -376,4 +376,4 @@ const mp_obj_module_t mp_module_hashlib = {
MP_REGISTER_MODULE(MP_QSTR_hashlib, mp_module_hashlib); MP_REGISTER_MODULE(MP_QSTR_hashlib, mp_module_hashlib);
#endif // MICROPY_PY_UHASHLIB #endif // MICROPY_PY_HASHLIB

View File

@ -27,7 +27,7 @@
#include "py/objlist.h" #include "py/objlist.h"
#include "py/runtime.h" #include "py/runtime.h"
#if MICROPY_PY_UHEAPQ #if MICROPY_PY_HEAPQ
// the algorithm here is modelled on CPython's heapq.py // the algorithm here is modelled on CPython's heapq.py
@ -121,4 +121,4 @@ const mp_obj_module_t mp_module_heapq = {
MP_REGISTER_MODULE(MP_QSTR_heapq, mp_module_heapq); MP_REGISTER_MODULE(MP_QSTR_heapq, mp_module_heapq);
#endif #endif
#endif // MICROPY_PY_UHEAPQ #endif // MICROPY_PY_HEAPQ

View File

@ -32,9 +32,9 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "py/stream.h" #include "py/stream.h"
#if MICROPY_PY_UJSON #if MICROPY_PY_JSON
#if MICROPY_PY_UJSON_SEPARATORS #if MICROPY_PY_JSON_SEPARATORS
enum { enum {
DUMP_MODE_TO_STRING = 1, DUMP_MODE_TO_STRING = 1,
@ -383,4 +383,4 @@ const mp_obj_module_t mp_module_json = {
MP_REGISTER_MODULE(MP_QSTR_json, mp_module_json); MP_REGISTER_MODULE(MP_QSTR_json, mp_module_json);
#endif // MICROPY_PY_UJSON #endif // MICROPY_PY_JSON

View File

@ -27,14 +27,14 @@
#include "py/objstr.h" #include "py/objstr.h"
#include "py/runtime.h" #include "py/runtime.h"
#if MICROPY_PY_UOS #if MICROPY_PY_OS
#include "extmod/misc.h" #include "extmod/misc.h"
#include "extmod/vfs.h" #include "extmod/vfs.h"
#if MICROPY_VFS_FAT #if MICROPY_VFS_FAT
#include "extmod/vfs_fat.h" #include "extmod/vfs_fat.h"
#if MICROPY_PY_UOS_SYNC #if MICROPY_PY_OS_SYNC
#include "lib/oofatfs/ff.h" #include "lib/oofatfs/ff.h"
#include "lib/oofatfs/diskio.h" #include "lib/oofatfs/diskio.h"
#endif #endif
@ -48,12 +48,12 @@
#include "extmod/vfs_posix.h" #include "extmod/vfs_posix.h"
#endif #endif
#if MICROPY_PY_UOS_UNAME #if MICROPY_PY_OS_UNAME
#include "genhdr/mpversion.h" #include "genhdr/mpversion.h"
#endif #endif
#ifdef MICROPY_PY_UOS_INCLUDEFILE #ifdef MICROPY_PY_OS_INCLUDEFILE
#include MICROPY_PY_UOS_INCLUDEFILE #include MICROPY_PY_OS_INCLUDEFILE
#endif #endif
#ifdef MICROPY_BUILD_TYPE #ifdef MICROPY_BUILD_TYPE
@ -62,7 +62,7 @@
#define MICROPY_BUILD_TYPE_PAREN #define MICROPY_BUILD_TYPE_PAREN
#endif #endif
#if MICROPY_PY_UOS_SYNC #if MICROPY_PY_OS_SYNC
// sync() // sync()
// Sync all filesystems. // Sync all filesystems.
STATIC mp_obj_t mp_os_sync(void) { STATIC mp_obj_t mp_os_sync(void) {
@ -77,9 +77,9 @@ STATIC mp_obj_t mp_os_sync(void) {
MP_DEFINE_CONST_FUN_OBJ_0(mp_os_sync_obj, mp_os_sync); MP_DEFINE_CONST_FUN_OBJ_0(mp_os_sync_obj, mp_os_sync);
#endif #endif
#if MICROPY_PY_UOS_UNAME #if MICROPY_PY_OS_UNAME
#if MICROPY_PY_UOS_UNAME_RELEASE_DYNAMIC #if MICROPY_PY_OS_UNAME_RELEASE_DYNAMIC
#define CONST_RELEASE #define CONST_RELEASE
#else #else
#define CONST_RELEASE const #define CONST_RELEASE const
@ -110,7 +110,7 @@ STATIC MP_DEFINE_ATTRTUPLE(
); );
STATIC mp_obj_t mp_os_uname(void) { STATIC mp_obj_t mp_os_uname(void) {
#if MICROPY_PY_UOS_UNAME_RELEASE_DYNAMIC #if MICROPY_PY_OS_UNAME_RELEASE_DYNAMIC
const char *release = mp_os_uname_release(); const char *release = mp_os_uname_release();
mp_os_uname_info_release_obj.len = strlen(release); mp_os_uname_info_release_obj.len = strlen(release);
mp_os_uname_info_release_obj.data = (const byte *)release; mp_os_uname_info_release_obj.data = (const byte *)release;
@ -124,21 +124,21 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_os_uname_obj, mp_os_uname);
STATIC const mp_rom_map_elem_t os_module_globals_table[] = { STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_os) },
#if MICROPY_PY_UOS_GETENV_PUTENV_UNSETENV #if MICROPY_PY_OS_GETENV_PUTENV_UNSETENV
{ MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mp_os_getenv_obj) }, { MP_ROM_QSTR(MP_QSTR_getenv), MP_ROM_PTR(&mp_os_getenv_obj) },
{ MP_ROM_QSTR(MP_QSTR_putenv), MP_ROM_PTR(&mp_os_putenv_obj) }, { MP_ROM_QSTR(MP_QSTR_putenv), MP_ROM_PTR(&mp_os_putenv_obj) },
{ MP_ROM_QSTR(MP_QSTR_unsetenv), MP_ROM_PTR(&mp_os_unsetenv_obj) }, { MP_ROM_QSTR(MP_QSTR_unsetenv), MP_ROM_PTR(&mp_os_unsetenv_obj) },
#endif #endif
#if MICROPY_PY_UOS_SEP #if MICROPY_PY_OS_SEP
{ MP_ROM_QSTR(MP_QSTR_sep), MP_ROM_QSTR(MP_QSTR__slash_) }, { MP_ROM_QSTR(MP_QSTR_sep), MP_ROM_QSTR(MP_QSTR__slash_) },
#endif #endif
#if MICROPY_PY_UOS_SYNC #if MICROPY_PY_OS_SYNC
{ MP_ROM_QSTR(MP_QSTR_sync), MP_ROM_PTR(&mp_os_sync_obj) }, { MP_ROM_QSTR(MP_QSTR_sync), MP_ROM_PTR(&mp_os_sync_obj) },
#endif #endif
#if MICROPY_PY_UOS_SYSTEM #if MICROPY_PY_OS_SYSTEM
{ MP_ROM_QSTR(MP_QSTR_system), MP_ROM_PTR(&mp_os_system_obj) }, { MP_ROM_QSTR(MP_QSTR_system), MP_ROM_PTR(&mp_os_system_obj) },
#endif #endif
#if MICROPY_PY_UOS_UNAME #if MICROPY_PY_OS_UNAME
{ MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&mp_os_uname_obj) }, { MP_ROM_QSTR(MP_QSTR_uname), MP_ROM_PTR(&mp_os_uname_obj) },
#endif #endif
#if MICROPY_PY_OS_URANDOM #if MICROPY_PY_OS_URANDOM
@ -163,10 +163,10 @@ STATIC const mp_rom_map_elem_t os_module_globals_table[] = {
#if MICROPY_PY_OS_DUPTERM #if MICROPY_PY_OS_DUPTERM
{ MP_ROM_QSTR(MP_QSTR_dupterm), MP_ROM_PTR(&mp_os_dupterm_obj) }, { MP_ROM_QSTR(MP_QSTR_dupterm), MP_ROM_PTR(&mp_os_dupterm_obj) },
#endif #endif
#if MICROPY_PY_UOS_DUPTERM_NOTIFY #if MICROPY_PY_OS_DUPTERM_NOTIFY
{ MP_ROM_QSTR(MP_QSTR_dupterm_notify), MP_ROM_PTR(&mp_os_dupterm_notify_obj) }, { MP_ROM_QSTR(MP_QSTR_dupterm_notify), MP_ROM_PTR(&mp_os_dupterm_notify_obj) },
#endif #endif
#if MICROPY_PY_UOS_ERRNO #if MICROPY_PY_OS_ERRNO
{ MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_os_errno_obj) }, { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_os_errno_obj) },
#endif #endif
@ -197,4 +197,4 @@ const mp_obj_module_t mp_module_os = {
MP_REGISTER_MODULE(MP_QSTR_os, mp_module_os); MP_REGISTER_MODULE(MP_QSTR_os, mp_module_os);
#endif // MICROPY_PY_UOS #endif // MICROPY_PY_OS

View File

@ -32,7 +32,7 @@
#include "extmod/moduplatform.h" #include "extmod/moduplatform.h"
#include "genhdr/mpversion.h" #include "genhdr/mpversion.h"
#if MICROPY_PY_UPLATFORM #if MICROPY_PY_PLATFORM
// platform - Access to underlying platform's identifying data // platform - Access to underlying platform's identifying data
@ -77,4 +77,4 @@ const mp_obj_module_t mp_module_platform = {
MP_REGISTER_MODULE(MP_QSTR_platform, mp_module_platform); MP_REGISTER_MODULE(MP_QSTR_platform, mp_module_platform);
#endif // MICROPY_PY_UPLATFORM #endif // MICROPY_PY_PLATFORM

View File

@ -30,7 +30,7 @@
#include "py/mpconfig.h" #include "py/mpconfig.h"
// Preprocessor directives identifying the platform. // Preprocessor directives identifying the platform.
// The (u)platform module itself is guarded by MICROPY_PY_UPLATFORM, see the // The platform module itself is guarded by MICROPY_PY_PLATFORM, see the
// .c file, but these are made available because they're generally usable. // .c file, but these are made available because they're generally usable.
// TODO: Add more architectures, compilers and libraries. // TODO: Add more architectures, compilers and libraries.
// See: https://sourceforge.net/p/predef/wiki/Home/ // See: https://sourceforge.net/p/predef/wiki/Home/

View File

@ -29,10 +29,10 @@
#include "py/runtime.h" #include "py/runtime.h"
#if MICROPY_PY_URANDOM #if MICROPY_PY_RANDOM
// Work out if the seed will be set on import or not. // Work out if the seed will be set on import or not.
#if MICROPY_MODULE_BUILTIN_INIT && defined(MICROPY_PY_URANDOM_SEED_INIT_FUNC) #if MICROPY_MODULE_BUILTIN_INIT && defined(MICROPY_PY_RANDOM_SEED_INIT_FUNC)
#define SEED_ON_IMPORT (1) #define SEED_ON_IMPORT (1)
#else #else
#define SEED_ON_IMPORT (0) #define SEED_ON_IMPORT (0)
@ -67,7 +67,7 @@ STATIC uint32_t yasmarang(void) {
// End of Yasmarang // End of Yasmarang
#if MICROPY_PY_URANDOM_EXTRA_FUNCS #if MICROPY_PY_RANDOM_EXTRA_FUNCS
// returns an unsigned integer below the given argument // returns an unsigned integer below the given argument
// n must not be zero // n must not be zero
@ -103,8 +103,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_random_getrandbits_obj, mod_random_getrandb
STATIC mp_obj_t mod_random_seed(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_random_seed(size_t n_args, const mp_obj_t *args) {
mp_uint_t seed; mp_uint_t seed;
if (n_args == 0 || args[0] == mp_const_none) { if (n_args == 0 || args[0] == mp_const_none) {
#ifdef MICROPY_PY_URANDOM_SEED_INIT_FUNC #ifdef MICROPY_PY_RANDOM_SEED_INIT_FUNC
seed = MICROPY_PY_URANDOM_SEED_INIT_FUNC; seed = MICROPY_PY_RANDOM_SEED_INIT_FUNC;
#else #else
mp_raise_ValueError(MP_ERROR_TEXT("no default seed")); mp_raise_ValueError(MP_ERROR_TEXT("no default seed"));
#endif #endif
@ -119,7 +119,7 @@ STATIC mp_obj_t mod_random_seed(size_t n_args, const mp_obj_t *args) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_random_seed_obj, 0, 1, mod_random_seed); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_random_seed_obj, 0, 1, mod_random_seed);
#if MICROPY_PY_URANDOM_EXTRA_FUNCS #if MICROPY_PY_RANDOM_EXTRA_FUNCS
STATIC mp_obj_t mod_random_randrange(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t mod_random_randrange(size_t n_args, const mp_obj_t *args) {
mp_int_t start = mp_obj_get_int(args[0]); mp_int_t start = mp_obj_get_int(args[0]);
@ -213,7 +213,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_random_uniform_obj, mod_random_uniform);
#endif #endif
#endif // MICROPY_PY_URANDOM_EXTRA_FUNCS #endif // MICROPY_PY_RANDOM_EXTRA_FUNCS
#if SEED_ON_IMPORT #if SEED_ON_IMPORT
STATIC mp_obj_t mod_random___init__(void) { STATIC mp_obj_t mod_random___init__(void) {
@ -237,7 +237,7 @@ STATIC const mp_rom_map_elem_t mp_module_random_globals_table[] = {
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_getrandbits), MP_ROM_PTR(&mod_random_getrandbits_obj) }, { MP_ROM_QSTR(MP_QSTR_getrandbits), MP_ROM_PTR(&mod_random_getrandbits_obj) },
{ MP_ROM_QSTR(MP_QSTR_seed), MP_ROM_PTR(&mod_random_seed_obj) }, { MP_ROM_QSTR(MP_QSTR_seed), MP_ROM_PTR(&mod_random_seed_obj) },
#if MICROPY_PY_URANDOM_EXTRA_FUNCS #if MICROPY_PY_RANDOM_EXTRA_FUNCS
{ MP_ROM_QSTR(MP_QSTR_randrange), MP_ROM_PTR(&mod_random_randrange_obj) }, { MP_ROM_QSTR(MP_QSTR_randrange), MP_ROM_PTR(&mod_random_randrange_obj) },
{ MP_ROM_QSTR(MP_QSTR_randint), MP_ROM_PTR(&mod_random_randint_obj) }, { MP_ROM_QSTR(MP_QSTR_randint), MP_ROM_PTR(&mod_random_randint_obj) },
{ MP_ROM_QSTR(MP_QSTR_choice), MP_ROM_PTR(&mod_random_choice_obj) }, { MP_ROM_QSTR(MP_QSTR_choice), MP_ROM_PTR(&mod_random_choice_obj) },
@ -258,4 +258,4 @@ const mp_obj_module_t mp_module_random = {
MP_REGISTER_MODULE(MP_QSTR_random, mp_module_random); MP_REGISTER_MODULE(MP_QSTR_random, mp_module_random);
#endif #endif
#endif // MICROPY_PY_URANDOM #endif // MICROPY_PY_RANDOM

View File

@ -37,7 +37,7 @@
#include "py/unicode.h" #include "py/unicode.h"
#endif #endif
#if MICROPY_PY_URE #if MICROPY_PY_RE
#define re1_5_stack_chk() MP_STACK_CHECK() #define re1_5_stack_chk() MP_STACK_CHECK()
@ -85,7 +85,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
} }
MP_DEFINE_CONST_FUN_OBJ_2(match_group_obj, match_group); MP_DEFINE_CONST_FUN_OBJ_2(match_group_obj, match_group);
#if MICROPY_PY_URE_MATCH_GROUPS #if MICROPY_PY_RE_MATCH_GROUPS
STATIC mp_obj_t match_groups(mp_obj_t self_in) { STATIC mp_obj_t match_groups(mp_obj_t self_in) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
@ -102,7 +102,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(match_groups_obj, match_groups);
#endif #endif
#if MICROPY_PY_URE_MATCH_SPAN_START_END #if MICROPY_PY_RE_MATCH_SPAN_START_END
STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span[2]) { STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span[2]) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(args[0]); mp_obj_match_t *self = MP_OBJ_TO_PTR(args[0]);
@ -167,10 +167,10 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(match_end_obj, 1, 2, match_end);
#if !MICROPY_ENABLE_DYNRUNTIME #if !MICROPY_ENABLE_DYNRUNTIME
STATIC const mp_rom_map_elem_t match_locals_dict_table[] = { STATIC const mp_rom_map_elem_t match_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_group), MP_ROM_PTR(&match_group_obj) }, { MP_ROM_QSTR(MP_QSTR_group), MP_ROM_PTR(&match_group_obj) },
#if MICROPY_PY_URE_MATCH_GROUPS #if MICROPY_PY_RE_MATCH_GROUPS
{ MP_ROM_QSTR(MP_QSTR_groups), MP_ROM_PTR(&match_groups_obj) }, { MP_ROM_QSTR(MP_QSTR_groups), MP_ROM_PTR(&match_groups_obj) },
#endif #endif
#if MICROPY_PY_URE_MATCH_SPAN_START_END #if MICROPY_PY_RE_MATCH_SPAN_START_END
{ MP_ROM_QSTR(MP_QSTR_span), MP_ROM_PTR(&match_span_obj) }, { MP_ROM_QSTR(MP_QSTR_span), MP_ROM_PTR(&match_span_obj) },
{ MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&match_start_obj) }, { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&match_start_obj) },
{ MP_ROM_QSTR(MP_QSTR_end), MP_ROM_PTR(&match_end_obj) }, { MP_ROM_QSTR(MP_QSTR_end), MP_ROM_PTR(&match_end_obj) },
@ -277,7 +277,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
} }
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_split_obj, 2, 3, re_split); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(re_split_obj, 2, 3, re_split);
#if MICROPY_PY_URE_SUB #if MICROPY_PY_RE_SUB
STATIC mp_obj_t re_sub_helper(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t re_sub_helper(size_t n_args, const mp_obj_t *args) {
mp_obj_re_t *self; mp_obj_re_t *self;
@ -405,7 +405,7 @@ STATIC const mp_rom_map_elem_t re_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) }, { MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) },
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) }, { MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) },
{ MP_ROM_QSTR(MP_QSTR_split), MP_ROM_PTR(&re_split_obj) }, { MP_ROM_QSTR(MP_QSTR_split), MP_ROM_PTR(&re_split_obj) },
#if MICROPY_PY_URE_SUB #if MICROPY_PY_RE_SUB
{ MP_ROM_QSTR(MP_QSTR_sub), MP_ROM_PTR(&re_sub_obj) }, { MP_ROM_QSTR(MP_QSTR_sub), MP_ROM_PTR(&re_sub_obj) },
#endif #endif
}; };
@ -429,7 +429,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
goto error; goto error;
} }
mp_obj_re_t *o = mp_obj_malloc_var(mp_obj_re_t, char, size, (mp_obj_type_t *)&re_type); mp_obj_re_t *o = mp_obj_malloc_var(mp_obj_re_t, char, size, (mp_obj_type_t *)&re_type);
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_RE_DEBUG
int flags = 0; int flags = 0;
if (n_args > 1) { if (n_args > 1) {
flags = mp_obj_get_int(args[1]); flags = mp_obj_get_int(args[1]);
@ -440,7 +440,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
error: error:
mp_raise_ValueError(MP_ERROR_TEXT("error in regex")); mp_raise_ValueError(MP_ERROR_TEXT("error in regex"));
} }
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_RE_DEBUG
if (flags & FLAG_DEBUG) { if (flags & FLAG_DEBUG) {
re1_5_dumpcode(&o->re); re1_5_dumpcode(&o->re);
} }
@ -455,10 +455,10 @@ STATIC const mp_rom_map_elem_t mp_module_re_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) }, { MP_ROM_QSTR(MP_QSTR_compile), MP_ROM_PTR(&mod_re_compile_obj) },
{ MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) }, { MP_ROM_QSTR(MP_QSTR_match), MP_ROM_PTR(&re_match_obj) },
{ MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) }, { MP_ROM_QSTR(MP_QSTR_search), MP_ROM_PTR(&re_search_obj) },
#if MICROPY_PY_URE_SUB #if MICROPY_PY_RE_SUB
{ MP_ROM_QSTR(MP_QSTR_sub), MP_ROM_PTR(&re_sub_obj) }, { MP_ROM_QSTR(MP_QSTR_sub), MP_ROM_PTR(&re_sub_obj) },
#endif #endif
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_RE_DEBUG
{ MP_ROM_QSTR(MP_QSTR_DEBUG), MP_ROM_INT(FLAG_DEBUG) }, { MP_ROM_QSTR(MP_QSTR_DEBUG), MP_ROM_INT(FLAG_DEBUG) },
#endif #endif
}; };
@ -482,11 +482,11 @@ MP_REGISTER_MODULE(MP_QSTR_re, mp_module_re);
#include "lib/re1.5/recursiveloop.c" #include "lib/re1.5/recursiveloop.c"
#include "lib/re1.5/charclass.c" #include "lib/re1.5/charclass.c"
#if MICROPY_PY_URE_DEBUG #if MICROPY_PY_RE_DEBUG
// Make sure the output print statements go to the same output as other Python output. // Make sure the output print statements go to the same output as other Python output.
#define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define printf(...) mp_printf(&mp_plat_print, __VA_ARGS__)
#include "lib/re1.5/dumpcode.c" #include "lib/re1.5/dumpcode.c"
#undef printf #undef printf
#endif #endif
#endif // MICROPY_PY_URE #endif // MICROPY_PY_RE

View File

@ -26,7 +26,7 @@
*/ */
#include "py/mpconfig.h" #include "py/mpconfig.h"
#if MICROPY_PY_USELECT #if MICROPY_PY_SELECT
#include <stdio.h> #include <stdio.h>
@ -107,7 +107,7 @@ STATIC mp_uint_t poll_map_poll(mp_map_t *poll_map, size_t *rwx_num) {
return n_ready; return n_ready;
} }
#if MICROPY_PY_USELECT_SELECT #if MICROPY_PY_SELECT_SELECT
// select(rlist, wlist, xlist[, timeout]) // select(rlist, wlist, xlist[, timeout])
STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
// get array data from tuple/list arguments // get array data from tuple/list arguments
@ -174,7 +174,7 @@ STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
} }
} }
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_select_select_obj, 3, 4, select_select);
#endif // MICROPY_PY_USELECT_SELECT #endif // MICROPY_PY_SELECT_SELECT
typedef struct _mp_obj_poll_t { typedef struct _mp_obj_poll_t {
mp_obj_base_t base; mp_obj_base_t base;
@ -356,7 +356,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(mp_select_poll_obj, select_poll);
STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_select_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_select) },
#if MICROPY_PY_USELECT_SELECT #if MICROPY_PY_SELECT_SELECT
{ MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) }, { MP_ROM_QSTR(MP_QSTR_select), MP_ROM_PTR(&mp_select_select_obj) },
#endif #endif
{ MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) }, { MP_ROM_QSTR(MP_QSTR_poll), MP_ROM_PTR(&mp_select_poll_obj) },
@ -375,4 +375,4 @@ const mp_obj_module_t mp_module_select = {
MP_REGISTER_MODULE(MP_QSTR_select, mp_module_select); MP_REGISTER_MODULE(MP_QSTR_select, mp_module_select);
#endif // MICROPY_PY_USELECT #endif // MICROPY_PY_SELECT

View File

@ -33,7 +33,7 @@
#include "py/stream.h" #include "py/stream.h"
#include "py/mperrno.h" #include "py/mperrno.h"
#if MICROPY_PY_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP #if MICROPY_PY_NETWORK && MICROPY_PY_SOCKET && !MICROPY_PY_LWIP
#include "shared/netutils/netutils.h" #include "shared/netutils/netutils.h"
#include "modnetwork.h" #include "modnetwork.h"
@ -75,7 +75,7 @@ STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, size_t
s->timeout = -1; s->timeout = -1;
s->callback = MP_OBJ_NULL; s->callback = MP_OBJ_NULL;
s->state = MOD_NETWORK_SS_NEW; s->state = MOD_NETWORK_SS_NEW;
#if MICROPY_PY_USOCKET_EXTENDED_STATE #if MICROPY_PY_SOCKET_EXTENDED_STATE
s->_private = NULL; s->_private = NULL;
#endif #endif
@ -94,7 +94,7 @@ STATIC void socket_select_nic(mod_network_socket_obj_t *self, const byte *ip) {
mp_raise_OSError(_errno); mp_raise_OSError(_errno);
} }
#if MICROPY_PY_USOCKET_EXTENDED_STATE #if MICROPY_PY_SOCKET_EXTENDED_STATE
// if a timeout was set before binding a NIC, call settimeout to reset it // if a timeout was set before binding a NIC, call settimeout to reset it
if (self->timeout != -1 && self->nic_protocol->settimeout(self, self->timeout, &_errno) != 0) { if (self->timeout != -1 && self->nic_protocol->settimeout(self, self->timeout, &_errno) != 0) {
mp_raise_OSError(_errno); mp_raise_OSError(_errno);
@ -134,7 +134,7 @@ STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) {
mp_raise_OSError(MP_ENOTCONN); mp_raise_OSError(MP_ENOTCONN);
} }
mp_int_t backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT; mp_int_t backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
if (n_args > 1) { if (n_args > 1) {
backlog = mp_obj_get_int(args[1]); backlog = mp_obj_get_int(args[1]);
backlog = (backlog < 0) ? 0 : backlog; backlog = (backlog < 0) ? 0 : backlog;
@ -177,7 +177,7 @@ STATIC mp_obj_t socket_accept(mp_obj_t self_in) {
socket2->timeout = -1; socket2->timeout = -1;
socket2->callback = MP_OBJ_NULL; socket2->callback = MP_OBJ_NULL;
socket2->state = MOD_NETWORK_SS_NEW; socket2->state = MOD_NETWORK_SS_NEW;
#if MICROPY_PY_USOCKET_EXTENDED_STATE #if MICROPY_PY_SOCKET_EXTENDED_STATE
socket2->_private = NULL; socket2->_private = NULL;
#endif #endif
@ -420,7 +420,7 @@ STATIC mp_obj_t socket_settimeout(mp_obj_t self_in, mp_obj_t timeout_in) {
#endif #endif
} }
if (self->nic == MP_OBJ_NULL) { if (self->nic == MP_OBJ_NULL) {
#if MICROPY_PY_USOCKET_EXTENDED_STATE #if MICROPY_PY_SOCKET_EXTENDED_STATE
// store the timeout in the socket state until a NIC is bound // store the timeout in the socket state until a NIC is bound
self->timeout = timeout; self->timeout = timeout;
#else #else
@ -655,4 +655,4 @@ const mp_obj_module_t mp_module_socket = {
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket); MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket);
#endif // MICROPY_PY_NETWORK && MICROPY_PY_USOCKET && !MICROPY_PY_LWIP #endif // MICROPY_PY_NETWORK && MICROPY_PY_SOCKET && !MICROPY_PY_LWIP

View File

@ -31,7 +31,7 @@
#include "py/stream.h" #include "py/stream.h"
#include "py/objstr.h" #include "py/objstr.h"
#if MICROPY_PY_USSL && MICROPY_SSL_AXTLS #if MICROPY_PY_SSL && MICROPY_SSL_AXTLS
#include "ssl.h" #include "ssl.h"
@ -118,7 +118,7 @@ STATIC NORETURN void ssl_raise_error(int err) {
STATIC mp_obj_ssl_socket_t *ssl_socket_new(mp_obj_t sock, struct ssl_args *args) { STATIC mp_obj_ssl_socket_t *ssl_socket_new(mp_obj_t sock, struct ssl_args *args) {
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_SSL_FINALISER
mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t);
#else #else
mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t);
@ -301,7 +301,7 @@ STATIC const mp_rom_map_elem_t ssl_socket_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) }, { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&ssl_socket_setblocking_obj) }, { MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&ssl_socket_setblocking_obj) },
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) },
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_SSL_FINALISER
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) },
#endif #endif
}; };
@ -359,4 +359,4 @@ const mp_obj_module_t mp_module_ssl = {
MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ssl); MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ssl);
#endif // MICROPY_PY_USSL && MICROPY_SSL_AXTLS #endif // MICROPY_PY_SSL && MICROPY_SSL_AXTLS

View File

@ -26,7 +26,7 @@
*/ */
#include "py/mpconfig.h" #include "py/mpconfig.h"
#if MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS #if MICROPY_PY_SSL && MICROPY_SSL_MBEDTLS
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -163,7 +163,7 @@ STATIC mp_obj_ssl_socket_t *socket_new(mp_obj_t sock, struct ssl_args *args) {
// Verify the socket object has the full stream protocol // Verify the socket object has the full stream protocol
mp_get_stream_raise(sock, MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL); mp_get_stream_raise(sock, MP_STREAM_OP_READ | MP_STREAM_OP_WRITE | MP_STREAM_OP_IOCTL);
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_SSL_FINALISER
mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj_with_finaliser(mp_obj_ssl_socket_t);
#else #else
mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t); mp_obj_ssl_socket_t *o = m_new_obj(mp_obj_ssl_socket_t);
@ -442,7 +442,7 @@ STATIC const mp_rom_map_elem_t ssl_socket_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) }, { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_stream_write_obj) },
{ MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) }, { MP_ROM_QSTR(MP_QSTR_setblocking), MP_ROM_PTR(&socket_setblocking_obj) },
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_stream_close_obj) },
#if MICROPY_PY_USSL_FINALISER #if MICROPY_PY_SSL_FINALISER
{ MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) }, { MP_ROM_QSTR(MP_QSTR___del__), MP_ROM_PTR(&mp_stream_close_obj) },
#endif #endif
#if MICROPY_UNIX_COVERAGE #if MICROPY_UNIX_COVERAGE
@ -509,4 +509,4 @@ const mp_obj_module_t mp_module_ssl = {
MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ssl); MP_REGISTER_MODULE(MP_QSTR_ssl, mp_module_ssl);
#endif // MICROPY_PY_USSL && MICROPY_SSL_MBEDTLS #endif // MICROPY_PY_SSL && MICROPY_SSL_MBEDTLS

View File

@ -30,13 +30,13 @@
#include "py/smallint.h" #include "py/smallint.h"
#include "extmod/modutime.h" #include "extmod/modutime.h"
#if MICROPY_PY_UTIME #if MICROPY_PY_TIME
#ifdef MICROPY_PY_UTIME_INCLUDEFILE #ifdef MICROPY_PY_TIME_INCLUDEFILE
#include MICROPY_PY_UTIME_INCLUDEFILE #include MICROPY_PY_TIME_INCLUDEFILE
#endif #endif
#if MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME #if MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME
#include "shared/timeutils/timeutils.h" #include "shared/timeutils/timeutils.h"
@ -96,9 +96,9 @@ STATIC mp_obj_t time_mktime(mp_obj_t tuple) {
} }
MP_DEFINE_CONST_FUN_OBJ_1(mp_time_mktime_obj, time_mktime); MP_DEFINE_CONST_FUN_OBJ_1(mp_time_mktime_obj, time_mktime);
#endif // MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME #endif // MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME
#if MICROPY_PY_UTIME_TIME_TIME_NS #if MICROPY_PY_TIME_TIME_TIME_NS
// time() // time()
// Return the number of seconds since the Epoch. // Return the number of seconds since the Epoch.
@ -114,10 +114,10 @@ STATIC mp_obj_t time_time_ns(void) {
} }
MP_DEFINE_CONST_FUN_OBJ_0(mp_time_time_ns_obj, time_time_ns); MP_DEFINE_CONST_FUN_OBJ_0(mp_time_time_ns_obj, time_time_ns);
#endif // MICROPY_PY_UTIME_TIME_TIME_NS #endif // MICROPY_PY_TIME_TIME_TIME_NS
STATIC mp_obj_t time_sleep(mp_obj_t seconds_o) { STATIC mp_obj_t time_sleep(mp_obj_t seconds_o) {
#ifdef MICROPY_PY_UTIME_CUSTOM_SLEEP #ifdef MICROPY_PY_TIME_CUSTOM_SLEEP
mp_time_sleep(seconds_o); mp_time_sleep(seconds_o);
#else #else
#if MICROPY_PY_BUILTINS_FLOAT #if MICROPY_PY_BUILTINS_FLOAT
@ -149,17 +149,17 @@ STATIC mp_obj_t time_sleep_us(mp_obj_t arg) {
MP_DEFINE_CONST_FUN_OBJ_1(mp_time_sleep_us_obj, time_sleep_us); MP_DEFINE_CONST_FUN_OBJ_1(mp_time_sleep_us_obj, time_sleep_us);
STATIC mp_obj_t time_ticks_ms(void) { STATIC mp_obj_t time_ticks_ms(void) {
return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & (MICROPY_PY_TIME_TICKS_PERIOD - 1));
} }
MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_ms_obj, time_ticks_ms); MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_ms_obj, time_ticks_ms);
STATIC mp_obj_t time_ticks_us(void) { STATIC mp_obj_t time_ticks_us(void) {
return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_us() & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_us() & (MICROPY_PY_TIME_TICKS_PERIOD - 1));
} }
MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_us_obj, time_ticks_us); MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_us_obj, time_ticks_us);
STATIC mp_obj_t time_ticks_cpu(void) { STATIC mp_obj_t time_ticks_cpu(void) {
return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_cpu() & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_cpu() & (MICROPY_PY_TIME_TICKS_PERIOD - 1));
} }
MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_cpu_obj, time_ticks_cpu); MP_DEFINE_CONST_FUN_OBJ_0(mp_time_ticks_cpu_obj, time_ticks_cpu);
@ -169,8 +169,8 @@ STATIC mp_obj_t time_ticks_diff(mp_obj_t end_in, mp_obj_t start_in) {
mp_uint_t end = MP_OBJ_SMALL_INT_VALUE(end_in); mp_uint_t end = MP_OBJ_SMALL_INT_VALUE(end_in);
// Optimized formula avoiding if conditions. We adjust difference "forward", // Optimized formula avoiding if conditions. We adjust difference "forward",
// wrap it around and adjust back. // wrap it around and adjust back.
mp_int_t diff = ((end - start + MICROPY_PY_UTIME_TICKS_PERIOD / 2) & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)) mp_int_t diff = ((end - start + MICROPY_PY_TIME_TICKS_PERIOD / 2) & (MICROPY_PY_TIME_TICKS_PERIOD - 1))
- MICROPY_PY_UTIME_TICKS_PERIOD / 2; - MICROPY_PY_TIME_TICKS_PERIOD / 2;
return MP_OBJ_NEW_SMALL_INT(diff); return MP_OBJ_NEW_SMALL_INT(diff);
} }
MP_DEFINE_CONST_FUN_OBJ_2(mp_time_ticks_diff_obj, time_ticks_diff); MP_DEFINE_CONST_FUN_OBJ_2(mp_time_ticks_diff_obj, time_ticks_diff);
@ -188,24 +188,24 @@ STATIC mp_obj_t time_ticks_add(mp_obj_t ticks_in, mp_obj_t delta_in) {
// //
// This unsigned comparison is equivalent to a signed comparison of: // This unsigned comparison is equivalent to a signed comparison of:
// delta <= -TICKS_PERIOD/2 || delta >= TICKS_PERIOD/2 // delta <= -TICKS_PERIOD/2 || delta >= TICKS_PERIOD/2
if (delta + MICROPY_PY_UTIME_TICKS_PERIOD / 2 - 1 >= MICROPY_PY_UTIME_TICKS_PERIOD - 1) { if (delta + MICROPY_PY_TIME_TICKS_PERIOD / 2 - 1 >= MICROPY_PY_TIME_TICKS_PERIOD - 1) {
mp_raise_msg(&mp_type_OverflowError, MP_ERROR_TEXT("ticks interval overflow")); mp_raise_msg(&mp_type_OverflowError, MP_ERROR_TEXT("ticks interval overflow"));
} }
return MP_OBJ_NEW_SMALL_INT((ticks + delta) & (MICROPY_PY_UTIME_TICKS_PERIOD - 1)); return MP_OBJ_NEW_SMALL_INT((ticks + delta) & (MICROPY_PY_TIME_TICKS_PERIOD - 1));
} }
MP_DEFINE_CONST_FUN_OBJ_2(mp_time_ticks_add_obj, time_ticks_add); MP_DEFINE_CONST_FUN_OBJ_2(mp_time_ticks_add_obj, time_ticks_add);
STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_time) }, { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_time) },
#if MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME #if MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME
{ MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&mp_time_localtime_obj) }, { MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&mp_time_localtime_obj) },
{ MP_ROM_QSTR(MP_QSTR_localtime), MP_ROM_PTR(&mp_time_localtime_obj) }, { MP_ROM_QSTR(MP_QSTR_localtime), MP_ROM_PTR(&mp_time_localtime_obj) },
{ MP_ROM_QSTR(MP_QSTR_mktime), MP_ROM_PTR(&mp_time_mktime_obj) }, { MP_ROM_QSTR(MP_QSTR_mktime), MP_ROM_PTR(&mp_time_mktime_obj) },
#endif #endif
#if MICROPY_PY_UTIME_TIME_TIME_NS #if MICROPY_PY_TIME_TIME_TIME_NS
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&mp_time_time_obj) }, { MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&mp_time_time_obj) },
{ MP_ROM_QSTR(MP_QSTR_time_ns), MP_ROM_PTR(&mp_time_time_ns_obj) }, { MP_ROM_QSTR(MP_QSTR_time_ns), MP_ROM_PTR(&mp_time_time_ns_obj) },
#endif #endif
@ -220,8 +220,8 @@ STATIC const mp_rom_map_elem_t mp_module_time_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_ticks_add), MP_ROM_PTR(&mp_time_ticks_add_obj) }, { MP_ROM_QSTR(MP_QSTR_ticks_add), MP_ROM_PTR(&mp_time_ticks_add_obj) },
{ MP_ROM_QSTR(MP_QSTR_ticks_diff), MP_ROM_PTR(&mp_time_ticks_diff_obj) }, { MP_ROM_QSTR(MP_QSTR_ticks_diff), MP_ROM_PTR(&mp_time_ticks_diff_obj) },
#ifdef MICROPY_PY_UTIME_EXTRA_GLOBALS #ifdef MICROPY_PY_TIME_EXTRA_GLOBALS
MICROPY_PY_UTIME_EXTRA_GLOBALS MICROPY_PY_TIME_EXTRA_GLOBALS
#endif #endif
}; };
STATIC MP_DEFINE_CONST_DICT(mp_module_time_globals, mp_module_time_globals_table); STATIC MP_DEFINE_CONST_DICT(mp_module_time_globals, mp_module_time_globals_table);
@ -233,4 +233,4 @@ const mp_obj_module_t mp_module_time = {
MP_REGISTER_MODULE(MP_QSTR_time, mp_module_time); MP_REGISTER_MODULE(MP_QSTR_time, mp_module_time);
#endif // MICROPY_PY_UTIME #endif // MICROPY_PY_TIME

View File

@ -31,9 +31,9 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "py/smallint.h" #include "py/smallint.h"
#if MICROPY_PY_UTIMEQ #if MICROPY_PY_TIMEQ
#define MODULO MICROPY_PY_UTIME_TICKS_PERIOD #define MODULO MICROPY_PY_TIME_TICKS_PERIOD
#define DEBUG 0 #define DEBUG 0
@ -232,4 +232,4 @@ const mp_obj_module_t mp_module_timeq = {
MP_REGISTER_MODULE(MP_QSTR_timeq, mp_module_timeq); MP_REGISTER_MODULE(MP_QSTR_timeq, mp_module_timeq);
#endif // MICROPY_PY_UTIMEQ #endif // MICROPY_PY_TIMEQ

View File

@ -32,7 +32,7 @@
#include "py/stream.h" #include "py/stream.h"
#include "extmod/moduwebsocket.h" #include "extmod/moduwebsocket.h"
#if MICROPY_PY_UWEBSOCKET #if MICROPY_PY_WEBSOCKET
enum { FRAME_HEADER, FRAME_OPT, PAYLOAD, CONTROL }; enum { FRAME_HEADER, FRAME_OPT, PAYLOAD, CONTROL };
@ -313,4 +313,4 @@ const mp_obj_module_t mp_module_websocket = {
MP_REGISTER_MODULE(MP_QSTR_websocket, mp_module_websocket); MP_REGISTER_MODULE(MP_QSTR_websocket, mp_module_websocket);
#endif // MICROPY_PY_UWEBSOCKET #endif // MICROPY_PY_WEBSOCKET

View File

@ -31,7 +31,7 @@
#include "py/stream.h" #include "py/stream.h"
#include "py/mperrno.h" #include "py/mperrno.h"
#if MICROPY_PY_UZLIB #if MICROPY_PY_ZLIB
#include "lib/uzlib/tinf.h" #include "lib/uzlib/tinf.h"
@ -236,4 +236,4 @@ MP_REGISTER_MODULE(MP_QSTR_zlib, mp_module_zlib);
#include "lib/uzlib/adler32.c" #include "lib/uzlib/adler32.c"
#include "lib/uzlib/crc32.c" #include "lib/uzlib/crc32.c"
#endif // MICROPY_PY_UZLIB #endif // MICROPY_PY_ZLIB

View File

@ -66,7 +66,7 @@ uintptr_t mp_os_dupterm_poll(uintptr_t poll_flags) {
int errcode = 0; int errcode = 0;
mp_uint_t ret = 0; mp_uint_t ret = 0;
const mp_stream_p_t *stream_p = mp_get_stream(s); const mp_stream_p_t *stream_p = mp_get_stream(s);
#if MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM #if MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM
if (mp_os_dupterm_is_builtin_stream(s)) { if (mp_os_dupterm_is_builtin_stream(s)) {
ret = stream_p->ioctl(s, MP_STREAM_POLL, poll_flags, &errcode); ret = stream_p->ioctl(s, MP_STREAM_POLL, poll_flags, &errcode);
} else } else
@ -99,7 +99,7 @@ int mp_os_dupterm_rx_chr(void) {
continue; continue;
} }
#if MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM #if MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM
if (mp_os_dupterm_is_builtin_stream(MP_STATE_VM(dupterm_objs[idx]))) { if (mp_os_dupterm_is_builtin_stream(MP_STATE_VM(dupterm_objs[idx]))) {
byte buf[1]; byte buf[1];
int errcode = 0; int errcode = 0;
@ -154,7 +154,7 @@ void mp_os_dupterm_tx_strn(const char *str, size_t len) {
continue; continue;
} }
#if MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM #if MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM
if (mp_os_dupterm_is_builtin_stream(MP_STATE_VM(dupterm_objs[idx]))) { if (mp_os_dupterm_is_builtin_stream(MP_STATE_VM(dupterm_objs[idx]))) {
int errcode = 0; int errcode = 0;
const mp_stream_p_t *stream_p = mp_get_stream(MP_STATE_VM(dupterm_objs[idx])); const mp_stream_p_t *stream_p = mp_get_stream(MP_STATE_VM(dupterm_objs[idx]));
@ -194,7 +194,7 @@ STATIC mp_obj_t mp_os_dupterm(size_t n_args, const mp_obj_t *args) {
MP_STATE_VM(dupterm_objs[idx]) = args[0]; MP_STATE_VM(dupterm_objs[idx]) = args[0];
} }
#if MICROPY_PY_UOS_DUPTERM_STREAM_DETACHED_ATTACHED #if MICROPY_PY_OS_DUPTERM_STREAM_DETACHED_ATTACHED
mp_os_dupterm_stream_detached_attached(previous_obj, args[0]); mp_os_dupterm_stream_detached_attached(previous_obj, args[0]);
#endif #endif

View File

@ -332,7 +332,7 @@ STATIC mp_obj_t vfs_posix_stat(mp_obj_t self_in, mp_obj_t path_in) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_2(vfs_posix_stat_obj, vfs_posix_stat); STATIC MP_DEFINE_CONST_FUN_OBJ_2(vfs_posix_stat_obj, vfs_posix_stat);
#if MICROPY_PY_UOS_STATVFS #if MICROPY_PY_OS_STATVFS
#ifdef __ANDROID__ #ifdef __ANDROID__
#define USE_STATFS 1 #define USE_STATFS 1
@ -390,7 +390,7 @@ STATIC const mp_rom_map_elem_t vfs_posix_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_rename), MP_ROM_PTR(&vfs_posix_rename_obj) }, { MP_ROM_QSTR(MP_QSTR_rename), MP_ROM_PTR(&vfs_posix_rename_obj) },
{ MP_ROM_QSTR(MP_QSTR_rmdir), MP_ROM_PTR(&vfs_posix_rmdir_obj) }, { MP_ROM_QSTR(MP_QSTR_rmdir), MP_ROM_PTR(&vfs_posix_rmdir_obj) },
{ MP_ROM_QSTR(MP_QSTR_stat), MP_ROM_PTR(&vfs_posix_stat_obj) }, { MP_ROM_QSTR(MP_QSTR_stat), MP_ROM_PTR(&vfs_posix_stat_obj) },
#if MICROPY_PY_UOS_STATVFS #if MICROPY_PY_OS_STATVFS
{ MP_ROM_QSTR(MP_QSTR_statvfs), MP_ROM_PTR(&vfs_posix_statvfs_obj) }, { MP_ROM_QSTR(MP_QSTR_statvfs), MP_ROM_PTR(&vfs_posix_statvfs_obj) },
#endif #endif
}; };

View File

@ -194,7 +194,7 @@ STATIC mp_uint_t vfs_posix_file_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_
return 0; return 0;
case MP_STREAM_GET_FILENO: case MP_STREAM_GET_FILENO:
return o->fd; return o->fd;
#if MICROPY_PY_USELECT #if MICROPY_PY_SELECT
case MP_STREAM_POLL: { case MP_STREAM_POLL: {
#ifdef _WIN32 #ifdef _WIN32
mp_raise_NotImplementedError(MP_ERROR_TEXT("poll on file not available on win32")); mp_raise_NotImplementedError(MP_ERROR_TEXT("poll on file not available on win32"));

View File

@ -489,7 +489,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind);
STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) {
mod_network_socket_obj_t *self = args[0]; mod_network_socket_obj_t *self = args[0];
int32_t backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT; int32_t backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
if (n_args > 1) { if (n_args > 1) {
backlog = mp_obj_get_int(args[1]); backlog = mp_obj_get_int(args[1]);
backlog = (backlog < 0) ? 0 : backlog; backlog = (backlog < 0) ? 0 : backlog;

View File

@ -104,29 +104,29 @@
#define MICROPY_PY_SYS_STDFILES (1) #define MICROPY_PY_SYS_STDFILES (1)
#define MICROPY_PY_CMATH (0) #define MICROPY_PY_CMATH (0)
#define MICROPY_PY_IO (1) #define MICROPY_PY_IO (1)
#define MICROPY_PY_UERRNO (1) #define MICROPY_PY_ERRNO (1)
#define MICROPY_PY_UERRNO_ERRORCODE (0) #define MICROPY_PY_ERRNO_ERRORCODE (0)
#define MICROPY_PY_THREAD (1) #define MICROPY_PY_THREAD (1)
#define MICROPY_PY_THREAD_GIL (1) #define MICROPY_PY_THREAD_GIL (1)
#define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_BINASCII (1)
#define MICROPY_PY_UCTYPES (0) #define MICROPY_PY_UCTYPES (0)
#define MICROPY_PY_UZLIB (0) #define MICROPY_PY_ZLIB (0)
#define MICROPY_PY_UJSON (1) #define MICROPY_PY_JSON (1)
#define MICROPY_PY_URE (1) #define MICROPY_PY_RE (1)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UHASHLIB (0) #define MICROPY_PY_HASHLIB (0)
#define MICROPY_PY_USELECT (1) #define MICROPY_PY_SELECT (1)
#define MICROPY_PY_UTIME (1) #define MICROPY_PY_TIME (1)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/cc3200/mods/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/cc3200/mods/modtime.c"
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1) #define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0) #define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)
#define MICROPY_KBD_EXCEPTION (1) #define MICROPY_KBD_EXCEPTION (1)
// We define our own list of errno constants to include in errno module // We define our own list of errno constants to include in errno module
#define MICROPY_PY_UERRNO_LIST \ #define MICROPY_PY_ERRNO_LIST \
X(EPERM) \ X(EPERM) \
X(EIO) \ X(EIO) \
X(ENODEV) \ X(ENODEV) \

View File

@ -224,7 +224,7 @@ soft_reset_exit:
// TODO: machine_rmt_deinit_all(); // TODO: machine_rmt_deinit_all();
machine_pins_deinit(); machine_pins_deinit();
machine_deinit(); machine_deinit();
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
socket_events_deinit(); socket_events_deinit();
#endif #endif

View File

@ -73,7 +73,7 @@ typedef struct _socket_obj_t {
uint8_t proto; uint8_t proto;
uint8_t state; uint8_t state;
unsigned int retries; unsigned int retries;
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
mp_obj_t events_callback; mp_obj_t events_callback;
struct _socket_obj_t *events_next; struct _socket_obj_t *events_next;
#endif #endif
@ -81,7 +81,7 @@ typedef struct _socket_obj_t {
void _socket_settimeout(socket_obj_t *sock, uint64_t timeout_ms); void _socket_settimeout(socket_obj_t *sock, uint64_t timeout_ms);
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
// Support for callbacks on asynchronous socket events (when socket becomes readable) // Support for callbacks on asynchronous socket events (when socket becomes readable)
// This divisor is used to reduce the load on the system, so it doesn't poll sockets too often // This divisor is used to reduce the load on the system, so it doesn't poll sockets too often
@ -144,7 +144,7 @@ void socket_events_handler(void) {
} }
} }
#endif // MICROPY_PY_USOCKET_EVENTS #endif // MICROPY_PY_SOCKET_EVENTS
static inline void check_for_exceptions(void) { static inline void check_for_exceptions(void) {
mp_handle_pending(true); mp_handle_pending(true);
@ -299,7 +299,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind);
STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) {
socket_obj_t *self = MP_OBJ_TO_PTR(args[0]); socket_obj_t *self = MP_OBJ_TO_PTR(args[0]);
int backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT; int backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
if (n_args > 1) { if (n_args > 1) {
backlog = mp_obj_get_int(args[1]); backlog = mp_obj_get_int(args[1]);
backlog = (backlog < 0) ? 0 : backlog; backlog = (backlog < 0) ? 0 : backlog;
@ -396,7 +396,7 @@ STATIC mp_obj_t socket_setsockopt(size_t n_args, const mp_obj_t *args) {
break; break;
} }
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
// level: SOL_SOCKET // level: SOL_SOCKET
// special "register callback" option // special "register callback" option
case 20: { case 20: {
@ -734,7 +734,7 @@ STATIC mp_uint_t socket_stream_ioctl(mp_obj_t self_in, mp_uint_t request, uintpt
return ret; return ret;
} else if (request == MP_STREAM_CLOSE) { } else if (request == MP_STREAM_CLOSE) {
if (socket->fd >= 0) { if (socket->fd >= 0) {
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
if (socket->events_callback != MP_OBJ_NULL) { if (socket->events_callback != MP_OBJ_NULL) {
socket_events_remove(socket); socket_events_remove(socket);
socket->events_callback = MP_OBJ_NULL; socket->events_callback = MP_OBJ_NULL;
@ -869,7 +869,7 @@ const mp_obj_module_t mp_module_socket = {
.globals = (mp_obj_dict_t *)&mp_module_socket_globals, .globals = (mp_obj_dict_t *)&mp_module_socket_globals,
}; };
// Note: This port doesn't define MICROPY_PY_USOCKET or MICROPY_PY_LWIP so // Note: This port doesn't define MICROPY_PY_SOCKET or MICROPY_PY_LWIP so
// this will not conflict with the common implementation provided by // this will not conflict with the common implementation provided by
// extmod/mod{lwip,socket}.c. // extmod/mod{lwip,socket}.c.
MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket); MP_REGISTER_MODULE(MP_QSTR_socket, mp_module_socket);

View File

@ -49,7 +49,7 @@ STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom);
#if MICROPY_PY_UOS_DUPTERM_NOTIFY #if MICROPY_PY_OS_DUPTERM_NOTIFY
STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) { STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) {
(void)obj_in; (void)obj_in;
for (;;) { for (;;) {

View File

@ -62,9 +62,9 @@
#define MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS (1) #define MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT esp32_help_text #define MICROPY_PY_BUILTINS_HELP_TEXT esp32_help_text
#define MICROPY_PY_IO_BUFFEREDWRITER (1) #define MICROPY_PY_IO_BUFFEREDWRITER (1)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/esp32/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/esp32/modtime.c"
#define MICROPY_PY_THREAD (1) #define MICROPY_PY_THREAD (1)
#define MICROPY_PY_THREAD_GIL (1) #define MICROPY_PY_THREAD_GIL (1)
#define MICROPY_PY_THREAD_GIL_VM_DIVISOR (32) #define MICROPY_PY_THREAD_GIL_VM_DIVISOR (32)
@ -83,17 +83,17 @@
#define MICROPY_BLUETOOTH_NIMBLE (1) #define MICROPY_BLUETOOTH_NIMBLE (1)
#define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1) #define MICROPY_BLUETOOTH_NIMBLE_BINDINGS_ONLY (1)
#endif #endif
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_UHASHLIB_SHA1 (1) #define MICROPY_PY_HASHLIB_SHA1 (1)
#define MICROPY_PY_UHASHLIB_SHA256 (1) #define MICROPY_PY_HASHLIB_SHA256 (1)
#define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_CRYPTOLIB (1)
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (esp_random()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (esp_random())
#define MICROPY_PY_UOS_INCLUDEFILE "ports/esp32/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/esp32/moduos.c"
#define MICROPY_PY_OS_DUPTERM (1) #define MICROPY_PY_OS_DUPTERM (1)
#define MICROPY_PY_UOS_DUPTERM_NOTIFY (1) #define MICROPY_PY_OS_DUPTERM_NOTIFY (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new #define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new
#define MICROPY_PY_MACHINE_BITSTREAM (1) #define MICROPY_PY_MACHINE_BITSTREAM (1)
@ -136,14 +136,14 @@
#endif #endif
#define MICROPY_HW_SOFTSPI_MIN_DELAY (0) #define MICROPY_HW_SOFTSPI_MIN_DELAY (0)
#define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (ets_get_cpu_frequency() * 1000000 / 200) // roughly #define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (ets_get_cpu_frequency() * 1000000 / 200) // roughly
#define MICROPY_PY_USSL (1) #define MICROPY_PY_SSL (1)
#define MICROPY_SSL_MBEDTLS (1) #define MICROPY_SSL_MBEDTLS (1)
#define MICROPY_PY_USSL_FINALISER (1) #define MICROPY_PY_SSL_FINALISER (1)
#define MICROPY_PY_UWEBSOCKET (1) #define MICROPY_PY_WEBSOCKET (1)
#define MICROPY_PY_WEBREPL (1) #define MICROPY_PY_WEBREPL (1)
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#define MICROPY_PY_UPLATFORM (1) #define MICROPY_PY_PLATFORM (1)
#define MICROPY_PY_USOCKET_EVENTS (MICROPY_PY_WEBREPL) #define MICROPY_PY_SOCKET_EVENTS (MICROPY_PY_WEBREPL)
#define MICROPY_PY_BLUETOOTH_RANDOM_ADDR (1) #define MICROPY_PY_BLUETOOTH_RANDOM_ADDR (1)
#define MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME ("ESP32") #define MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME ("ESP32")
@ -169,10 +169,10 @@ void *esp_native_code_commit(void *, size_t, void *);
#define MICROPY_BEGIN_ATOMIC_SECTION() portENTER_CRITICAL_NESTED() #define MICROPY_BEGIN_ATOMIC_SECTION() portENTER_CRITICAL_NESTED()
#define MICROPY_END_ATOMIC_SECTION(state) portEXIT_CRITICAL_NESTED(state) #define MICROPY_END_ATOMIC_SECTION(state) portEXIT_CRITICAL_NESTED(state)
#if MICROPY_PY_USOCKET_EVENTS #if MICROPY_PY_SOCKET_EVENTS
#define MICROPY_PY_USOCKET_EVENTS_HANDLER extern void socket_events_handler(void); socket_events_handler(); #define MICROPY_PY_SOCKET_EVENTS_HANDLER extern void socket_events_handler(void); socket_events_handler();
#else #else
#define MICROPY_PY_USOCKET_EVENTS_HANDLER #define MICROPY_PY_SOCKET_EVENTS_HANDLER
#endif #endif
#if MICROPY_PY_THREAD #if MICROPY_PY_THREAD
@ -180,7 +180,7 @@ void *esp_native_code_commit(void *, size_t, void *);
do { \ do { \
extern void mp_handle_pending(bool); \ extern void mp_handle_pending(bool); \
mp_handle_pending(true); \ mp_handle_pending(true); \
MICROPY_PY_USOCKET_EVENTS_HANDLER \ MICROPY_PY_SOCKET_EVENTS_HANDLER \
MP_THREAD_GIL_EXIT(); \ MP_THREAD_GIL_EXIT(); \
ulTaskNotifyTake(pdFALSE, 1); \ ulTaskNotifyTake(pdFALSE, 1); \
MP_THREAD_GIL_ENTER(); \ MP_THREAD_GIL_ENTER(); \
@ -190,7 +190,7 @@ void *esp_native_code_commit(void *, size_t, void *);
do { \ do { \
extern void mp_handle_pending(bool); \ extern void mp_handle_pending(bool); \
mp_handle_pending(true); \ mp_handle_pending(true); \
MICROPY_PY_USOCKET_EVENTS_HANDLER \ MICROPY_PY_SOCKET_EVENTS_HANDLER \
asm ("waiti 0"); \ asm ("waiti 0"); \
} while (0); } while (0);
#endif #endif

View File

@ -138,7 +138,7 @@ void mp_hal_delay_ms(uint32_t ms) {
uint64_t t0 = esp_timer_get_time(); uint64_t t0 = esp_timer_get_time();
for (;;) { for (;;) {
mp_handle_pending(true); mp_handle_pending(true);
MICROPY_PY_USOCKET_EVENTS_HANDLER MICROPY_PY_SOCKET_EVENTS_HANDLER
MP_THREAD_GIL_EXIT(); MP_THREAD_GIL_EXIT();
uint64_t t1 = esp_timer_get_time(); uint64_t t1 = esp_timer_get_time();
dt = t1 - t0; dt = t1 - t0;

View File

@ -27,7 +27,7 @@ QSTR_GLOBAL_DEPENDENCIES = $(BOARD_DIR)/mpconfigboard.h
# MicroPython feature configurations # MicroPython feature configurations
MICROPY_ROM_TEXT_COMPRESSION ?= 1 MICROPY_ROM_TEXT_COMPRESSION ?= 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_AXTLS = 1 MICROPY_SSL_AXTLS = 1
AXTLS_DEFS_EXTRA = -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=4096 AXTLS_DEFS_EXTRA = -Dabort=abort_ -DRT_MAX_PLAIN_LENGTH=1024 -DRT_EXTRA=4096
BTREE_DEFS_EXTRA = -DDEFPSIZE=1024 -DMINCACHE=3 BTREE_DEFS_EXTRA = -DDEFPSIZE=1024 -DMINCACHE=3

View File

@ -11,4 +11,4 @@
#define MICROPY_READER_VFS (MICROPY_VFS) #define MICROPY_READER_VFS (MICROPY_VFS)
#define MICROPY_VFS (1) #define MICROPY_VFS (1)
#define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_CRYPTOLIB (1)

View File

@ -14,4 +14,4 @@
#define MICROPY_PY_FSTRINGS (0) #define MICROPY_PY_FSTRINGS (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) #define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
#define MICROPY_PY_UASYNCIO (0) #define MICROPY_PY_UASYNCIO (0)
#define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_CRYPTOLIB (1)

View File

@ -9,5 +9,5 @@
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0) #define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
#define MICROPY_PY_SYS_STDIO_BUFFER (0) #define MICROPY_PY_SYS_STDIO_BUFFER (0)
#define MICROPY_PY_UASYNCIO (0) #define MICROPY_PY_UASYNCIO (0)
#define MICROPY_PY_URE_SUB (0) #define MICROPY_PY_RE_SUB (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)

View File

@ -36,8 +36,8 @@
#define MICROPY_PY_MATH_FACTORIAL (0) #define MICROPY_PY_MATH_FACTORIAL (0)
#define MICROPY_PY_MATH_ISCLOSE (0) #define MICROPY_PY_MATH_ISCLOSE (0)
#define MICROPY_PY_SYS_PS1_PS2 (0) #define MICROPY_PY_SYS_PS1_PS2 (0)
#define MICROPY_PY_UBINASCII_CRC32 (0) #define MICROPY_PY_BINASCII_CRC32 (0)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (0) #define MICROPY_PY_RANDOM_EXTRA_FUNCS (0)
// Configure other options. // Configure other options.
#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C) #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C)
@ -54,11 +54,11 @@
#define MICROPY_REPL_EVENT_DRIVEN (0) #define MICROPY_REPL_EVENT_DRIVEN (0)
#define MICROPY_USE_INTERNAL_ERRNO (1) #define MICROPY_USE_INTERNAL_ERRNO (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT esp_help_text #define MICROPY_PY_BUILTINS_HELP_TEXT esp_help_text
#define MICROPY_PY_UHASHLIB_SHA1 (MICROPY_PY_USSL && MICROPY_SSL_AXTLS) #define MICROPY_PY_HASHLIB_SHA1 (MICROPY_PY_SSL && MICROPY_SSL_AXTLS)
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (*WDEV_HWRNG) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (*WDEV_HWRNG)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/esp8266/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/esp8266/modutime.c"
#define MICROPY_PY_LWIP (1) #define MICROPY_PY_LWIP (1)
#define MICROPY_PY_LWIP_SOCK_RAW (1) #define MICROPY_PY_LWIP_SOCK_RAW (1)
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
@ -78,19 +78,19 @@
#endif #endif
#define MICROPY_PY_NETWORK_INCLUDEFILE "ports/esp8266/modnetwork.h" #define MICROPY_PY_NETWORK_INCLUDEFILE "ports/esp8266/modnetwork.h"
#define MICROPY_PY_NETWORK_MODULE_GLOBALS_INCLUDEFILE "ports/esp8266/modnetwork_globals.h" #define MICROPY_PY_NETWORK_MODULE_GLOBALS_INCLUDEFILE "ports/esp8266/modnetwork_globals.h"
#define MICROPY_PY_UWEBSOCKET (1) #define MICROPY_PY_WEBSOCKET (1)
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#define MICROPY_PY_WEBREPL (1) #define MICROPY_PY_WEBREPL (1)
#define MICROPY_PY_WEBREPL_DELAY (20) #define MICROPY_PY_WEBREPL_DELAY (20)
#define MICROPY_PY_WEBREPL_STATIC_FILEBUF (1) #define MICROPY_PY_WEBREPL_STATIC_FILEBUF (1)
#define MICROPY_PY_UOS_INCLUDEFILE "ports/esp8266/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/esp8266/modos.c"
#define MICROPY_PY_OS_DUPTERM (2) #define MICROPY_PY_OS_DUPTERM (2)
#define MICROPY_PY_UOS_DUPTERM_NOTIFY (1) #define MICROPY_PY_OS_DUPTERM_NOTIFY (1)
#define MICROPY_PY_UOS_DUPTERM_STREAM_DETACHED_ATTACHED (1) #define MICROPY_PY_OS_DUPTERM_STREAM_DETACHED_ATTACHED (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_UNAME_RELEASE_DYNAMIC (1) #define MICROPY_PY_OS_UNAME_RELEASE_DYNAMIC (1)
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_WARNINGS (1) #define MICROPY_WARNINGS (1)

View File

@ -7,5 +7,5 @@ MICROPY_HW_FLASH_TYPE ?= qspi_nor_flash
MICROPY_HW_FLASH_SIZE ?= 0x800000 # 8MB MICROPY_HW_FLASH_SIZE ?= 0x800000 # 8MB
MICROPY_PY_NETWORK_NINAW10 ?= 1 MICROPY_PY_NETWORK_NINAW10 ?= 1
MICROPY_PY_USSL ?= 1 MICROPY_PY_SSL ?= 1
MICROPY_SSL_MBEDTLS ?= 1 MICROPY_SSL_MBEDTLS ?= 1

View File

@ -10,7 +10,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -10,7 +10,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -10,7 +10,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -10,7 +10,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -12,7 +12,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x4000000 # 64MB MICROPY_HW_SDRAM_SIZE = 0x4000000 # 64MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -3,7 +3,7 @@
#define MICROPY_HW_USB_MANUFACTURER_STRING "Olimex Ltd." #define MICROPY_HW_USB_MANUFACTURER_STRING "Olimex Ltd."
#define MICROPY_HW_USB_VID 0x15ba #define MICROPY_HW_USB_VID 0x15ba
#define MICROPY_HW_USB_PID 0x0046 #define MICROPY_HW_USB_PID 0x0046
#define MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM (0) #define MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM (0)
// Olimex RT1010-Py has 1 board LED // Olimex RT1010-Py has 1 board LED
#define MICROPY_HW_LED1_PIN (pin_GPIO_11) #define MICROPY_HW_LED1_PIN (pin_GPIO_11)

View File

@ -10,7 +10,7 @@ MICROPY_HW_SDRAM_AVAIL = 1
MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB MICROPY_HW_SDRAM_SIZE = 0x2000000 # 32MB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -8,7 +8,7 @@ MICROPY_HW_FLASH_SIZE = 0x800000 # 8MB
MICROPY_HW_FLASH_RESERVED ?= 0x1000 # 4KB MICROPY_HW_FLASH_RESERVED ?= 0x1000 # 4KB
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py

View File

@ -95,7 +95,7 @@ uint32_t trng_random_u32(void) {
return rngval; return rngval;
} }
#if MICROPY_PY_UOS_URANDOM #if MICROPY_PY_OS_URANDOM
STATIC mp_obj_t mp_os_urandom(mp_obj_t num) { STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
mp_int_t n = mp_obj_get_int(num); mp_int_t n = mp_obj_get_int(num);
vstr_t vstr; vstr_t vstr;
@ -109,7 +109,7 @@ STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom);
#endif #endif
#if MICROPY_PY_UOS_DUPTERM_NOTIFY #if MICROPY_PY_OS_DUPTERM_NOTIFY
STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) { STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) {
(void)obj_in; (void)obj_in;
for (;;) { for (;;) {

View File

@ -69,17 +69,17 @@ uint32_t trng_random_u32(void);
// Extended modules // Extended modules
#define MICROPY_EPOCH_IS_1970 (1) #define MICROPY_EPOCH_IS_1970 (1)
#define MICROPY_PY_USSL_FINALISER (MICROPY_PY_USSL) #define MICROPY_PY_SSL_FINALISER (MICROPY_PY_SSL)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/mimxrt/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/mimxrt/modutime.c"
#define MICROPY_PY_UOS_INCLUDEFILE "ports/mimxrt/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/mimxrt/moduos.c"
#define MICROPY_PY_OS_DUPTERM (3) #define MICROPY_PY_OS_DUPTERM (3)
#define MICROPY_PY_UOS_DUPTERM_NOTIFY (1) #define MICROPY_PY_OS_DUPTERM_NOTIFY (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (trng_random_u32()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (trng_random_u32())
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new #define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new
#define MICROPY_PY_MACHINE_BITSTREAM (1) #define MICROPY_PY_MACHINE_BITSTREAM (1)
@ -96,7 +96,7 @@ uint32_t trng_random_u32(void);
#define MICROPY_PY_MACHINE_TIMER (1) #define MICROPY_PY_MACHINE_TIMER (1)
#define MICROPY_SOFT_TIMER_TICKS_MS systick_ms #define MICROPY_SOFT_TIMER_TICKS_MS systick_ms
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#define MICROPY_PY_UPLATFORM (1) #define MICROPY_PY_PLATFORM (1)
// fatfs configuration used in ffconf.h // fatfs configuration used in ffconf.h
#define MICROPY_FATFS_ENABLE_LFN (1) #define MICROPY_FATFS_ENABLE_LFN (1)
@ -107,16 +107,16 @@ uint32_t trng_random_u32(void);
#ifndef MICROPY_PY_NETWORK #ifndef MICROPY_PY_NETWORK
#define MICROPY_PY_NETWORK (1) #define MICROPY_PY_NETWORK (1)
#endif #endif
#ifndef MICROPY_PY_USOCKET #ifndef MICROPY_PY_SOCKET
#define MICROPY_PY_USOCKET (1) #define MICROPY_PY_SOCKET (1)
#endif #endif
#define MICROPY_PY_UWEBSOCKET (MICROPY_PY_LWIP) #define MICROPY_PY_WEBSOCKET (MICROPY_PY_LWIP)
#define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP) #define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP)
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP) #define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
#define MICROPY_PY_USSL_FINALISER (MICROPY_PY_USSL) #define MICROPY_PY_SSL_FINALISER (MICROPY_PY_SSL)
// #define MICROPY_PY_UHASHLIB_MD5 (MICROPY_PY_USSL) // #define MICROPY_PY_HASHLIB_MD5 (MICROPY_PY_SSL)
#define MICROPY_PY_UHASHLIB_SHA1 (MICROPY_PY_USSL) #define MICROPY_PY_HASHLIB_SHA1 (MICROPY_PY_SSL)
// #define MICROPY_PY_UCRYPTOLIB (MICROPY_PY_USSL) // #define MICROPY_PY_CRYPTOLIB (MICROPY_PY_SSL)
// Prevent the "LWIP task" from running. // Prevent the "LWIP task" from running.
#define MICROPY_PY_LWIP_ENTER MICROPY_PY_PENDSV_ENTER #define MICROPY_PY_LWIP_ENTER MICROPY_PY_PENDSV_ENTER

View File

@ -41,8 +41,8 @@
#define MICROPY_EMIT_INLINE_THUMB (1) #define MICROPY_EMIT_INLINE_THUMB (1)
// Enable optional modules // Enable optional modules
#define MICROPY_PY_UERRNO (1) #define MICROPY_PY_ERRNO (1)
#define MICROPY_PY_UHASHLIB (1) #define MICROPY_PY_HASHLIB (1)
// Peripherals Config // Peripherals Config
#define MICROPY_PY_MACHINE_UART (1) #define MICROPY_PY_MACHINE_UART (1)

View File

@ -80,8 +80,8 @@
#define MICROPY_PY_SYS_STDFILES (CORE_FEAT) #define MICROPY_PY_SYS_STDFILES (CORE_FEAT)
#endif #endif
#ifndef MICROPY_PY_UBINASCII #ifndef MICROPY_PY_BINASCII
#define MICROPY_PY_UBINASCII (CORE_FEAT) #define MICROPY_PY_BINASCII (CORE_FEAT)
#endif #endif
#ifndef MICROPY_PY_NRF #ifndef MICROPY_PY_NRF
@ -134,7 +134,7 @@
#endif #endif
// Use port specific os module rather than extmod variant. // Use port specific os module rather than extmod variant.
#define MICROPY_PY_UOS (0) #define MICROPY_PY_OS (0)
#define MICROPY_STREAMS_NON_BLOCK (1) #define MICROPY_STREAMS_NON_BLOCK (1)
#define MICROPY_CAN_OVERRIDE_BUILTINS (1) #define MICROPY_CAN_OVERRIDE_BUILTINS (1)
@ -155,9 +155,9 @@
#define MICROPY_MODULE_BUILTIN_INIT (1) #define MICROPY_MODULE_BUILTIN_INIT (1)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_SYS_MAXSIZE (1) #define MICROPY_PY_SYS_MAXSIZE (1)
#define MICROPY_PY_URANDOM (1) #define MICROPY_PY_RANDOM (1)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) #define MICROPY_PY_RANDOM_EXTRA_FUNCS (1)
#define MICROPY_PY_UTIME (1) #define MICROPY_PY_TIME (1)
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_PULSE (0) #define MICROPY_PY_MACHINE_PULSE (0)
#define MICROPY_PY_MACHINE_SOFTI2C (MICROPY_PY_MACHINE_I2C) #define MICROPY_PY_MACHINE_SOFTI2C (MICROPY_PY_MACHINE_I2C)
@ -286,7 +286,7 @@ typedef unsigned int mp_uint_t; // must be pointer size
typedef long mp_off_t; typedef long mp_off_t;
#if MICROPY_HW_ENABLE_RNG #if MICROPY_HW_ENABLE_RNG
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rng_generate_random_word()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (rng_generate_random_word())
long unsigned int rng_generate_random_word(void); long unsigned int rng_generate_random_word(void);
#endif #endif

View File

@ -36,16 +36,16 @@
#define MICROPY_PY_SYS_EXIT (1) #define MICROPY_PY_SYS_EXIT (1)
#define MICROPY_PY_SYS_MAXSIZE (1) #define MICROPY_PY_SYS_MAXSIZE (1)
#define MICROPY_PY_SYS_PLATFORM "qemu-arm" #define MICROPY_PY_SYS_PLATFORM "qemu-arm"
#define MICROPY_PY_UERRNO (1) #define MICROPY_PY_ERRNO (1)
#define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_BINASCII (1)
#define MICROPY_PY_URANDOM (1) #define MICROPY_PY_RANDOM (1)
#define MICROPY_PY_UCTYPES (1) #define MICROPY_PY_UCTYPES (1)
#define MICROPY_PY_UZLIB (1) #define MICROPY_PY_ZLIB (1)
#define MICROPY_PY_UJSON (1) #define MICROPY_PY_JSON (1)
#define MICROPY_PY_UOS (1) #define MICROPY_PY_OS (1)
#define MICROPY_PY_URE (1) #define MICROPY_PY_RE (1)
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_UHASHLIB (1) #define MICROPY_PY_HASHLIB (1)
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_USE_INTERNAL_PRINTF (1) #define MICROPY_USE_INTERNAL_PRINTF (1)

View File

@ -10,8 +10,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0) #define MICROPY_PY_MATH (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_THREAD (0) #define MICROPY_PY_THREAD (0)
// peripheral config // peripheral config

View File

@ -10,8 +10,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (1) #define MICROPY_PY_BUILTINS_COMPLEX (1)
#define MICROPY_PY_GENERATOR_PEND_THROW (1) #define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1) #define MICROPY_PY_MATH (1)
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only #define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only
// peripheral config // peripheral config

View File

@ -10,8 +10,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (1) #define MICROPY_PY_BUILTINS_COMPLEX (1)
#define MICROPY_PY_GENERATOR_PEND_THROW (1) #define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1) #define MICROPY_PY_MATH (1)
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only #define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only
// peripheral config // peripheral config

View File

@ -10,8 +10,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (1) #define MICROPY_PY_BUILTINS_COMPLEX (1)
#define MICROPY_PY_GENERATOR_PEND_THROW (1) #define MICROPY_PY_GENERATOR_PEND_THROW (1)
#define MICROPY_PY_MATH (1) #define MICROPY_PY_MATH (1)
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only #define MICROPY_PY_THREAD (0) // disable ARM_THUMB_FP using vldr due to RA has single float only
// peripheral config // peripheral config

View File

@ -10,8 +10,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0) #define MICROPY_PY_MATH (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_THREAD (0) #define MICROPY_PY_THREAD (0)
// peripheral config // peripheral config

View File

@ -91,19 +91,19 @@
#endif #endif
// extended modules // extended modules
#define MICROPY_PY_UOS_INCLUDEFILE "ports/renesas-ra/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/renesas-ra/moduos.c"
#define MICROPY_PY_OS_DUPTERM (3) #define MICROPY_PY_OS_DUPTERM (3)
#define MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM (1) #define MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM (1)
#define MICROPY_PY_UOS_DUPTERM_STREAM_DETACHED_ATTACHED (1) #define MICROPY_PY_OS_DUPTERM_STREAM_DETACHED_ATTACHED (1)
#define MICROPY_PY_UOS_SEP (1) #define MICROPY_PY_OS_SEP (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_URANDOM (MICROPY_HW_ENABLE_RNG) #define MICROPY_PY_OS_URANDOM (MICROPY_HW_ENABLE_RNG)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/renesas-ra/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/renesas-ra/modtime.c"
#ifndef MICROPY_PY_UTIMEQ #ifndef MICROPY_PY_TIMEQ
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#endif #endif
#ifndef MICROPY_PY_MACHINE #ifndef MICROPY_PY_MACHINE
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
@ -126,8 +126,8 @@
#ifndef MICROPY_PY_ONEWIRE #ifndef MICROPY_PY_ONEWIRE
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#endif #endif
#ifndef MICROPY_PY_UPLATFORM #ifndef MICROPY_PY_PLATFORM
#define MICROPY_PY_UPLATFORM (1) #define MICROPY_PY_PLATFORM (1)
#endif #endif
// fatfs configuration used in ffconf.h // fatfs configuration used in ffconf.h

View File

@ -8,7 +8,7 @@
#define MICROPY_PY_NETWORK (1) #define MICROPY_PY_NETWORK (1)
// Enable MD5 hash. // Enable MD5 hash.
#define MICROPY_PY_UHASHLIB_MD5 (1) #define MICROPY_PY_HASHLIB_MD5 (1)
// Disable internal error numbers. // Disable internal error numbers.
#define MICROPY_USE_INTERNAL_ERRNO (0) #define MICROPY_USE_INTERNAL_ERRNO (0)

View File

@ -95,21 +95,21 @@
// Extended modules // Extended modules
#define MICROPY_EPOCH_IS_1970 (1) #define MICROPY_EPOCH_IS_1970 (1)
#define MICROPY_PY_UOS_INCLUDEFILE "ports/rp2/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/rp2/moduos.c"
#ifndef MICROPY_PY_OS_DUPTERM #ifndef MICROPY_PY_OS_DUPTERM
#define MICROPY_PY_OS_DUPTERM (1) #define MICROPY_PY_OS_DUPTERM (1)
#endif #endif
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_PY_URE_MATCH_GROUPS (1) #define MICROPY_PY_RE_MATCH_GROUPS (1)
#define MICROPY_PY_URE_MATCH_SPAN_START_END (1) #define MICROPY_PY_RE_MATCH_SPAN_START_END (1)
#define MICROPY_PY_UHASHLIB_SHA1 (1) #define MICROPY_PY_HASHLIB_SHA1 (1)
#define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_CRYPTOLIB (1)
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/rp2/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/rp2/modutime.c"
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rosc_random_u32()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (rosc_random_u32())
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new #define MICROPY_PY_MACHINE_PIN_MAKE_NEW mp_pin_make_new
#define MICROPY_PY_MACHINE_BITSTREAM (1) #define MICROPY_PY_MACHINE_BITSTREAM (1)
@ -151,14 +151,14 @@
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-rp2" #define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "mpy-rp2"
#endif #endif
#ifndef MICROPY_PY_USOCKET #ifndef MICROPY_PY_SOCKET
#define MICROPY_PY_USOCKET (1) #define MICROPY_PY_SOCKET (1)
#endif #endif
#ifndef MICROPY_PY_USSL #ifndef MICROPY_PY_SSL
#define MICROPY_PY_USSL (1) #define MICROPY_PY_SSL (1)
#endif #endif
#ifndef MICROPY_PY_UWEBSOCKET #ifndef MICROPY_PY_WEBSOCKET
#define MICROPY_PY_UWEBSOCKET (1) #define MICROPY_PY_WEBSOCKET (1)
#endif #endif
#ifndef MICROPY_PY_WEBREPL #ifndef MICROPY_PY_WEBREPL
#define MICROPY_PY_WEBREPL (1) #define MICROPY_PY_WEBREPL (1)
@ -181,8 +181,8 @@ extern const struct _mp_obj_type_t mp_network_cyw43_type;
#if MICROPY_PY_NETWORK_NINAW10 #if MICROPY_PY_NETWORK_NINAW10
// This Network interface requires the extended socket state. // This Network interface requires the extended socket state.
#ifndef MICROPY_PY_USOCKET_EXTENDED_STATE #ifndef MICROPY_PY_SOCKET_EXTENDED_STATE
#define MICROPY_PY_USOCKET_EXTENDED_STATE (1) #define MICROPY_PY_SOCKET_EXTENDED_STATE (1)
#endif #endif
extern const struct _mp_obj_type_t mod_network_nic_type_nina; extern const struct _mp_obj_type_t mod_network_nic_type_nina;
#define MICROPY_HW_NIC_NINAW10 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_nic_type_nina) }, #define MICROPY_HW_NIC_NINAW10 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_nic_type_nina) },

View File

@ -14,8 +14,8 @@
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#endif #endif
#ifndef MICROPY_PY_UTIME #ifndef MICROPY_PY_TIME
#define MICROPY_PY_UTIME (1) #define MICROPY_PY_TIME (1)
#endif #endif
#ifndef MICROPY_PY_MATH #ifndef MICROPY_PY_MATH
@ -26,7 +26,7 @@
#define MICROPY_PY_CMATH (0) #define MICROPY_PY_CMATH (0)
#endif #endif
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (trng_random_u32(300)) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (trng_random_u32(300))
unsigned long trng_random_u32(int delay); unsigned long trng_random_u32(int delay);
#define VFS_BLOCK_SIZE_BYTES (1536) // 24x 64B flash pages; #define VFS_BLOCK_SIZE_BYTES (1536) // 24x 64B flash pages;
@ -35,7 +35,7 @@ unsigned long trng_random_u32(int delay);
#define MICROPY_HW_UART_TXBUF (1) #define MICROPY_HW_UART_TXBUF (1)
#endif #endif
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU #ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU
#define MICROPY_PY_MACHINE_PIN_BOARD_CPU (1) #define MICROPY_PY_MACHINE_PIN_BOARD_CPU (1)

View File

@ -27,9 +27,9 @@
#define MICROPY_PY_MACHINE_DHT_READINTO (1) #define MICROPY_PY_MACHINE_DHT_READINTO (1)
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_OS_URANDOM (1)
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (trng_random_u32()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (trng_random_u32())
unsigned long trng_random_u32(void); unsigned long trng_random_u32(void);
#ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU #ifndef MICROPY_PY_MACHINE_PIN_BOARD_CPU

View File

@ -69,7 +69,7 @@ uint32_t trng_random_u32(int delay) {
#define TRNG_RANDOM_U32 trng_random_u32(10) #define TRNG_RANDOM_U32 trng_random_u32(10)
#endif #endif
#if MICROPY_PY_UOS_URANDOM #if MICROPY_PY_OS_URANDOM
STATIC mp_obj_t mp_os_urandom(mp_obj_t num) { STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
mp_int_t n = mp_obj_get_int(num); mp_int_t n = mp_obj_get_int(num);
vstr_t vstr; vstr_t vstr;
@ -88,16 +88,16 @@ STATIC mp_obj_t mp_os_urandom(mp_obj_t num) {
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom); STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_os_urandom_obj, mp_os_urandom);
#endif // MICROPY_PY_UOS_URANDOM #endif // MICROPY_PY_OS_URANDOM
#if MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM #if MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM
bool mp_os_dupterm_is_builtin_stream(mp_const_obj_t stream) { bool mp_os_dupterm_is_builtin_stream(mp_const_obj_t stream) {
const mp_obj_type_t *type = mp_obj_get_type(stream); const mp_obj_type_t *type = mp_obj_get_type(stream);
return type == &machine_uart_type; return type == &machine_uart_type;
} }
#endif #endif
#if MICROPY_PY_UOS_DUPTERM_NOTIFY #if MICROPY_PY_OS_DUPTERM_NOTIFY
STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) { STATIC mp_obj_t mp_os_dupterm_notify(mp_obj_t obj_in) {
(void)obj_in; (void)obj_in;
for (;;) { for (;;) {

View File

@ -77,21 +77,21 @@
#define MICROPY_PY_IO_IOBASE (1) #define MICROPY_PY_IO_IOBASE (1)
// Extended modules // Extended modules
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/samd/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/samd/modtime.c"
#define MICROPY_PY_MACHINE (1) #define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_UOS (1) #define MICROPY_PY_OS (1)
#define MICROPY_PY_UOS_INCLUDEFILE "ports/samd/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/samd/modos.c"
#define MICROPY_READER_VFS (1) #define MICROPY_READER_VFS (1)
#define MICROPY_VFS (1) #define MICROPY_VFS (1)
#define MICROPY_PY_UJSON (1) #define MICROPY_PY_JSON (1)
#define MICROPY_PY_URE (1) #define MICROPY_PY_RE (1)
#define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_BINASCII (1)
#define MICROPY_PY_UCTYPES (1) #define MICROPY_PY_UCTYPES (1)
#define MICROPY_PY_UHEAPQ (1) #define MICROPY_PY_HEAPQ (1)
#define MICROPY_PY_URANDOM (1) #define MICROPY_PY_RANDOM (1)
#define MICROPY_PY_UZLIB (1) #define MICROPY_PY_ZLIB (1)
#define MICROPY_PY_UASYNCIO (1) #define MICROPY_PY_UASYNCIO (1)
#define MICROPY_PY_MACHINE_RTC (1) #define MICROPY_PY_MACHINE_RTC (1)
#ifndef MICROPY_PY_MACHINE_ADC #ifndef MICROPY_PY_MACHINE_ADC

View File

@ -21,7 +21,7 @@ MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0 MICROPY_BLUETOOTH_BTSTACK = 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -21,7 +21,7 @@ MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0 MICROPY_BLUETOOTH_BTSTACK = 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -21,7 +21,7 @@ MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_BLUETOOTH_BTSTACK = 0 MICROPY_BLUETOOTH_BTSTACK = 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -12,13 +12,13 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0) #define MICROPY_PY_MATH (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_PY_ONEWIRE (0) #define MICROPY_PY_ONEWIRE (0)
#define MICROPY_PY_STM (0) #define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0) #define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0) #define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (0)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)

View File

@ -4,7 +4,7 @@
#define MICROPY_EMIT_THUMB (0) #define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_EMIT_INLINE_THUMB (0)
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_HW_HAS_SWITCH (1) #define MICROPY_HW_HAS_SWITCH (1)

View File

@ -5,12 +5,12 @@
#define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_EMIT_INLINE_THUMB (0)
#define MICROPY_OPT_COMPUTED_GOTO (0) #define MICROPY_OPT_COMPUTED_GOTO (0)
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_PY_STM (0) #define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0) #define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)

View File

@ -7,7 +7,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -7,7 +7,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -7,7 +7,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -7,7 +7,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -8,7 +8,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -10,13 +10,13 @@
#define MICROPY_HW_HAS_FLASH (0) // QSPI extflash not mounted #define MICROPY_HW_HAS_FLASH (0) // QSPI extflash not mounted
#define MICROPY_PY_UASYNCIO (0) #define MICROPY_PY_UASYNCIO (0)
#define MICROPY_PY_UZLIB (0) #define MICROPY_PY_ZLIB (0)
#define MICROPY_PY_UBINASCII (0) #define MICROPY_PY_BINASCII (0)
#define MICROPY_PY_UHASHLIB (0) #define MICROPY_PY_HASHLIB (0)
#define MICROPY_PY_UJSON (0) #define MICROPY_PY_JSON (0)
#define MICROPY_PY_URE (0) #define MICROPY_PY_RE (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
// The board has an 24MHz HSE, the following gives 170MHz CPU speed // The board has an 24MHz HSE, the following gives 170MHz CPU speed

View File

@ -18,7 +18,7 @@ endif
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1 MICROPY_VFS_LFS2 = 1

View File

@ -18,7 +18,7 @@ endif
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1 MICROPY_VFS_LFS2 = 1

View File

@ -12,13 +12,13 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0) #define MICROPY_PY_MATH (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_PY_ONEWIRE (0) #define MICROPY_PY_ONEWIRE (0)
#define MICROPY_PY_STM (0) #define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0) #define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_PY_MACHINE_BITSTREAM (0) #define MICROPY_PY_MACHINE_BITSTREAM (0)

View File

@ -6,13 +6,13 @@
#define MICROPY_OPT_COMPUTED_GOTO (0) #define MICROPY_OPT_COMPUTED_GOTO (0)
#define MICROPY_PY_BUILTINS_COMPLEX (0) #define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_PY_ONEWIRE (0) #define MICROPY_PY_ONEWIRE (0)
#define MICROPY_PY_STM (0) #define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0) #define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_ADC (1) #define MICROPY_HW_ENABLE_ADC (1)

View File

@ -1,7 +1,7 @@
#define MICROPY_HW_BOARD_NAME "NUCLEO-L452RE" #define MICROPY_HW_BOARD_NAME "NUCLEO-L452RE"
#define MICROPY_HW_MCU_NAME "STM32L452RE" #define MICROPY_HW_MCU_NAME "STM32L452RE"
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)

View File

@ -11,13 +11,13 @@
#define MICROPY_PY_GENERATOR_PEND_THROW (0) #define MICROPY_PY_GENERATOR_PEND_THROW (0)
#define MICROPY_PY_MATH (0) #define MICROPY_PY_MATH (0)
#define MICROPY_PY_FRAMEBUF (0) #define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_USOCKET (0) #define MICROPY_PY_SOCKET (0)
#define MICROPY_PY_NETWORK (0) #define MICROPY_PY_NETWORK (0)
#define MICROPY_PY_ONEWIRE (0) #define MICROPY_PY_ONEWIRE (0)
#define MICROPY_PY_STM (0) #define MICROPY_PY_STM (0)
#define MICROPY_PY_PYB_LEGACY (0) #define MICROPY_PY_PYB_LEGACY (0)
#define MICROPY_PY_UHEAPQ (0) #define MICROPY_PY_HEAPQ (0)
#define MICROPY_PY_UTIMEQ (0) #define MICROPY_PY_TIMEQ (0)
#define MICROPY_HW_HAS_FLASH (1) #define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_ENABLE_RTC (1) #define MICROPY_HW_ENABLE_RTC (1)

View File

@ -7,5 +7,5 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1

View File

@ -15,7 +15,7 @@ MICROPY_BLUETOOTH_NIMBLE ?= 1
MICROPY_BLUETOOTH_BTSTACK ?= 0 MICROPY_BLUETOOTH_BTSTACK ?= 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1 MICROPY_VFS_LFS2 = 1

View File

@ -15,7 +15,7 @@ MICROPY_BLUETOOTH_NIMBLE ?= 1
MICROPY_BLUETOOTH_BTSTACK ?= 0 MICROPY_BLUETOOTH_BTSTACK ?= 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1 MICROPY_VFS_LFS2 = 1

View File

@ -12,7 +12,7 @@ MICROPY_BLUETOOTH_NIMBLE ?= 1
MICROPY_BLUETOOTH_BTSTACK ?= 0 MICROPY_BLUETOOTH_BTSTACK ?= 0
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1 MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1 MICROPY_VFS_LFS2 = 1

View File

@ -42,7 +42,7 @@ endif
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -7,7 +7,7 @@ TEXT1_ADDR = 0x08020000
# MicroPython settings # MicroPython settings
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -6,7 +6,7 @@ TEXT0_ADDR = 0x08000000
TEXT1_ADDR = 0x08020000 TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1 MICROPY_PY_LWIP = 1
MICROPY_PY_USSL = 1 MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1 MICROPY_SSL_MBEDTLS = 1
FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py

View File

@ -29,7 +29,7 @@
#include "usb.h" #include "usb.h"
#include "uart.h" #include "uart.h"
#if MICROPY_PY_UOS_URANDOM #if MICROPY_PY_OS_URANDOM
// urandom(n) // urandom(n)
// Return a bytes object with n random bytes, generated by the hardware // Return a bytes object with n random bytes, generated by the hardware
// random number generator. // random number generator.

View File

@ -92,24 +92,24 @@
#endif #endif
// extended modules // extended modules
#define MICROPY_PY_USSL_FINALISER (MICROPY_PY_USSL) #define MICROPY_PY_SSL_FINALISER (MICROPY_PY_SSL)
#define MICROPY_PY_UHASHLIB_MD5 (MICROPY_PY_USSL) #define MICROPY_PY_HASHLIB_MD5 (MICROPY_PY_SSL)
#define MICROPY_PY_UHASHLIB_SHA1 (MICROPY_PY_USSL) #define MICROPY_PY_HASHLIB_SHA1 (MICROPY_PY_SSL)
#define MICROPY_PY_UCRYPTOLIB (MICROPY_PY_USSL) #define MICROPY_PY_CRYPTOLIB (MICROPY_PY_SSL)
#define MICROPY_PY_UOS_INCLUDEFILE "ports/stm32/moduos.c" #define MICROPY_PY_OS_INCLUDEFILE "ports/stm32/moduos.c"
#define MICROPY_PY_OS_DUPTERM (3) #define MICROPY_PY_OS_DUPTERM (3)
#define MICROPY_PY_UOS_DUPTERM_BUILTIN_STREAM (1) #define MICROPY_PY_OS_DUPTERM_BUILTIN_STREAM (1)
#define MICROPY_PY_UOS_DUPTERM_STREAM_DETACHED_ATTACHED (1) #define MICROPY_PY_OS_DUPTERM_STREAM_DETACHED_ATTACHED (1)
#define MICROPY_PY_UOS_SEP (1) #define MICROPY_PY_OS_SEP (1)
#define MICROPY_PY_UOS_SYNC (1) #define MICROPY_PY_OS_SYNC (1)
#define MICROPY_PY_UOS_UNAME (1) #define MICROPY_PY_OS_UNAME (1)
#define MICROPY_PY_UOS_URANDOM (MICROPY_HW_ENABLE_RNG) #define MICROPY_PY_OS_URANDOM (MICROPY_HW_ENABLE_RNG)
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rng_get()) #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (rng_get())
#define MICROPY_PY_UTIME_GMTIME_LOCALTIME_MKTIME (1) #define MICROPY_PY_TIME_GMTIME_LOCALTIME_MKTIME (1)
#define MICROPY_PY_UTIME_TIME_TIME_NS (1) #define MICROPY_PY_TIME_TIME_TIME_NS (1)
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/stm32/modutime.c" #define MICROPY_PY_TIME_INCLUDEFILE "ports/stm32/modutime.c"
#ifndef MICROPY_PY_UTIMEQ #ifndef MICROPY_PY_TIMEQ
#define MICROPY_PY_UTIMEQ (1) #define MICROPY_PY_TIMEQ (1)
#endif #endif
#define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP) #define MICROPY_PY_LWIP_SOCK_RAW (MICROPY_PY_LWIP)
#ifndef MICROPY_PY_MACHINE #ifndef MICROPY_PY_MACHINE
@ -130,10 +130,10 @@
#endif #endif
#define MICROPY_HW_SOFTSPI_MIN_DELAY (0) #define MICROPY_HW_SOFTSPI_MIN_DELAY (0)
#define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (HAL_RCC_GetSysClockFreq() / 48) #define MICROPY_HW_SOFTSPI_MAX_BAUDRATE (HAL_RCC_GetSysClockFreq() / 48)
#define MICROPY_PY_UWEBSOCKET (MICROPY_PY_LWIP) #define MICROPY_PY_WEBSOCKET (MICROPY_PY_LWIP)
#define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP) #define MICROPY_PY_WEBREPL (MICROPY_PY_LWIP)
#ifndef MICROPY_PY_USOCKET #ifndef MICROPY_PY_SOCKET
#define MICROPY_PY_USOCKET (1) #define MICROPY_PY_SOCKET (1)
#endif #endif
#ifndef MICROPY_PY_NETWORK #ifndef MICROPY_PY_NETWORK
#define MICROPY_PY_NETWORK (1) #define MICROPY_PY_NETWORK (1)
@ -141,8 +141,8 @@
#ifndef MICROPY_PY_ONEWIRE #ifndef MICROPY_PY_ONEWIRE
#define MICROPY_PY_ONEWIRE (1) #define MICROPY_PY_ONEWIRE (1)
#endif #endif
#ifndef MICROPY_PY_UPLATFORM #ifndef MICROPY_PY_PLATFORM
#define MICROPY_PY_UPLATFORM (1) #define MICROPY_PY_PLATFORM (1)
#endif #endif
// fatfs configuration used in ffconf.h // fatfs configuration used in ffconf.h
@ -324,5 +324,5 @@ static inline mp_uint_t disable_irq(void) {
// We need to provide a declaration/definition of alloca() // We need to provide a declaration/definition of alloca()
#include <alloca.h> #include <alloca.h>
// Needed for MICROPY_PY_URANDOM_SEED_INIT_FUNC. // Needed for MICROPY_PY_RANDOM_SEED_INIT_FUNC.
uint32_t rng_get(void); uint32_t rng_get(void);

View File

@ -138,7 +138,7 @@ CFLAGS += -DMICROPY_PY_THREAD=1 -DMICROPY_PY_THREAD_GIL=0
LDFLAGS += $(LIBPTHREAD) LDFLAGS += $(LIBPTHREAD)
endif endif
ifeq ($(MICROPY_PY_USSL),1) ifeq ($(MICROPY_PY_SSL),1)
ifeq ($(MICROPY_SSL_AXTLS),1) ifeq ($(MICROPY_SSL_AXTLS),1)
endif endif

View File

@ -70,5 +70,5 @@ or not). If you intend to build MicroPython with additional options
(like cross-compiling), the same set of options should be passed to `make (like cross-compiling), the same set of options should be passed to `make
deplibs`. To actually enable/disable use of dependencies, edit the deplibs`. To actually enable/disable use of dependencies, edit the
`ports/unix/mpconfigport.mk` file, which has inline descriptions of the `ports/unix/mpconfigport.mk` file, which has inline descriptions of the
options. For example, to build the SSL module, `MICROPY_PY_USSL` should be options. For example, to build the SSL module, `MICROPY_PY_SSL` should be
set to 1. set to 1.

View File

@ -27,7 +27,7 @@
#define MICROPY_INCLUDED_MBEDTLS_CONFIG_H #define MICROPY_INCLUDED_MBEDTLS_CONFIG_H
// Set mbedtls configuration // Set mbedtls configuration
#define MBEDTLS_CIPHER_MODE_CTR // needed for MICROPY_PY_UCRYPTOLIB_CTR #define MBEDTLS_CIPHER_MODE_CTR // needed for MICROPY_PY_CRYPTOLIB_CTR
// Enable mbedtls modules // Enable mbedtls modules
#define MBEDTLS_HAVEGE_C #define MBEDTLS_HAVEGE_C

View File

@ -27,10 +27,10 @@
#include "py/mpconfig.h" #include "py/mpconfig.h"
#if MICROPY_PY_USELECT_POSIX #if MICROPY_PY_SELECT_POSIX
#if MICROPY_PY_USELECT #if MICROPY_PY_SELECT
#error "Can't have both MICROPY_PY_USELECT and MICROPY_PY_USELECT_POSIX." #error "Can't have both MICROPY_PY_SELECT and MICROPY_PY_SELECT_POSIX."
#endif #endif
#include <stdio.h> #include <stdio.h>
@ -353,4 +353,4 @@ const mp_obj_module_t mp_module_select = {
MP_REGISTER_MODULE(MP_QSTR_select, mp_module_select); MP_REGISTER_MODULE(MP_QSTR_select, mp_module_select);
#endif // MICROPY_PY_USELECT_POSIX #endif // MICROPY_PY_SELECT_POSIX

View File

@ -146,7 +146,7 @@ STATIC mp_uint_t socket_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, i
case MP_STREAM_GET_FILENO: case MP_STREAM_GET_FILENO:
return self->fd; return self->fd;
#if MICROPY_PY_USELECT #if MICROPY_PY_SELECT
case MP_STREAM_POLL: { case MP_STREAM_POLL: {
mp_uint_t ret = 0; mp_uint_t ret = 0;
uint8_t pollevents = 0; uint8_t pollevents = 0;
@ -227,7 +227,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind);
STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) { STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) {
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]); mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
int backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT; int backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
if (n_args > 1) { if (n_args > 1) {
backlog = (int)mp_obj_get_int(args[1]); backlog = (int)mp_obj_get_int(args[1]);
backlog = (backlog < 0) ? 0 : backlog; backlog = (backlog < 0) ? 0 : backlog;

Some files were not shown because too many files have changed in this diff Show More