extmod/modonewire: Make _onewire module configurable via macro option.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
afe0634c98
commit
d41f6dde56
|
@ -30,6 +30,8 @@
|
|||
#include "py/obj.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#if MICROPY_PY_ONEWIRE
|
||||
|
||||
/******************************************************************************/
|
||||
// Low-level 1-Wire routines
|
||||
|
||||
|
@ -160,3 +162,5 @@ const mp_obj_module_t mp_module_onewire = {
|
|||
.base = { &mp_type_module },
|
||||
.globals = (mp_obj_dict_t *)&onewire_module_globals,
|
||||
};
|
||||
|
||||
#endif // MICROPY_PY_ONEWIRE
|
||||
|
|
|
@ -182,6 +182,7 @@
|
|||
#define MICROPY_PY_WEBREPL (1)
|
||||
#define MICROPY_PY_FRAMEBUF (1)
|
||||
#define MICROPY_PY_BTREE (1)
|
||||
#define MICROPY_PY_ONEWIRE (1)
|
||||
#define MICROPY_PY_USOCKET_EVENTS (MICROPY_PY_WEBREPL)
|
||||
#define MICROPY_PY_BLUETOOTH_RANDOM_ADDR (1)
|
||||
#define MICROPY_PY_BLUETOOTH_DEFAULT_GAP_NAME ("ESP32")
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
#define MICROPY_PY_MACHINE_SPI (1)
|
||||
#define MICROPY_PY_MACHINE_SOFTSPI (1)
|
||||
#define MICROPY_PY_UWEBSOCKET (1)
|
||||
#define MICROPY_PY_ONEWIRE (1)
|
||||
#define MICROPY_PY_WEBREPL (1)
|
||||
#define MICROPY_PY_WEBREPL_DELAY (20)
|
||||
#define MICROPY_PY_WEBREPL_STATIC_FILEBUF (1)
|
||||
|
|
|
@ -130,6 +130,7 @@ uint32_t trng_random_u32(void);
|
|||
#define MICROPY_PY_MACHINE_SPI (1)
|
||||
#define MICROPY_PY_MACHINE_SOFTSPI (1)
|
||||
#define MICROPY_PY_FRAMEBUF (1)
|
||||
#define MICROPY_PY_ONEWIRE (1)
|
||||
|
||||
// Use VfsLfs2's types for fileio/textio
|
||||
#define mp_type_fileio mp_type_vfs_lfs2_fileio
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
#define MICROPY_PY_MACHINE_SPI_LSB (SPI_LSB_FIRST)
|
||||
#define MICROPY_PY_MACHINE_SOFTSPI (1)
|
||||
#define MICROPY_PY_FRAMEBUF (1)
|
||||
#define MICROPY_PY_ONEWIRE (1)
|
||||
#define MICROPY_VFS (1)
|
||||
#define MICROPY_VFS_LFS2 (1)
|
||||
#define MICROPY_VFS_FAT (1)
|
||||
|
|
|
@ -1517,6 +1517,11 @@ typedef double mp_float_t;
|
|||
#define MICROPY_PY_BTREE (0)
|
||||
#endif
|
||||
|
||||
// Whether to provide the low-level "_onewire" module
|
||||
#ifndef MICROPY_PY_ONEWIRE
|
||||
#define MICROPY_PY_ONEWIRE (0)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Hooks for a port to add builtins */
|
||||
|
||||
|
|
Loading…
Reference in New Issue