Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit b26b42e

Browse files
committed
extmod/modonewire.c: Compile with modonewire from vanilla MicroPython
1 parent 69dd8b5 commit b26b42e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

esp32/hal/esp32_mphal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ void mp_hal_set_interrupt_char(int c);
3030
void mp_hal_set_reset_char(int c);
3131
void mp_hal_reset_safe_and_boot(bool reset);
3232

33+
// https://github.com/micropython/micropython/blob/master/ports/esp32/mphalport.h
34+
#define mp_hal_quiet_timing_enter() MICROPY_BEGIN_ATOMIC_SECTION()
35+
#define mp_hal_quiet_timing_exit(irq_state) MICROPY_END_ATOMIC_SECTION(irq_state)
36+
#define mp_hal_delay_us_fast(us) ets_delay_us(us)
37+
3338
#endif // _INCLUDED_MPHAL_H_

esp32/mpconfigport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ extern const struct _mp_obj_module_t mp_module_uhashlib;
191191
extern const struct _mp_obj_module_t module_ucrypto;
192192
extern const struct _mp_obj_module_t mp_module_ussl;
193193
extern const struct _mp_obj_module_t mp_module_uqueue;
194+
extern const struct _mp_obj_module_t mp_module_onewire;
194195

195196
#define MICROPY_PORT_BUILTIN_MODULES \
196197
{ MP_OBJ_NEW_QSTR(MP_QSTR_umachine), (mp_obj_t)&machine_module }, \
@@ -206,6 +207,7 @@ extern const struct _mp_obj_module_t mp_module_uqueue;
206207
{ MP_OBJ_NEW_QSTR(MP_QSTR_ussl), (mp_obj_t)&mp_module_ussl }, \
207208
{ MP_OBJ_NEW_QSTR(MP_QSTR_uerrno), (mp_obj_t)&mp_module_uerrno }, \
208209
{ MP_OBJ_NEW_QSTR(MP_QSTR_uqueue), (mp_obj_t)&mp_module_uqueue }, \
210+
{ MP_OBJ_NEW_QSTR(MP_QSTR__onewire), (mp_obj_t)&mp_module_onewire }, \
209211

210212
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
211213
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&machine_module }, \

py/py.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ PY_EXTMOD_O_BASENAME = \
287287
extmod/moduwebsocket.o \
288288
extmod/modwebrepl.o \
289289
extmod/modframebuf.o \
290+
extmod/modonewire.o \
290291
extmod/vfs.o \
291292
extmod/vfs_reader.o \
292293
extmod/vfs_posix.o \

0 commit comments

Comments
 (0)