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

Commit

Permalink
extmod/modonewire.c: Compile with modonewire from vanilla MicroPython
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 4, 2019
1 parent 69dd8b5 commit b26b42e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions esp32/hal/esp32_mphal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@ void mp_hal_set_interrupt_char(int c);
void mp_hal_set_reset_char(int c);
void mp_hal_reset_safe_and_boot(bool reset);

// https://github.com/micropython/micropython/blob/master/ports/esp32/mphalport.h
#define mp_hal_quiet_timing_enter() MICROPY_BEGIN_ATOMIC_SECTION()
#define mp_hal_quiet_timing_exit(irq_state) MICROPY_END_ATOMIC_SECTION(irq_state)
#define mp_hal_delay_us_fast(us) ets_delay_us(us)

#endif // _INCLUDED_MPHAL_H_
2 changes: 2 additions & 0 deletions esp32/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ extern const struct _mp_obj_module_t mp_module_uhashlib;
extern const struct _mp_obj_module_t module_ucrypto;
extern const struct _mp_obj_module_t mp_module_ussl;
extern const struct _mp_obj_module_t mp_module_uqueue;
extern const struct _mp_obj_module_t mp_module_onewire;

#define MICROPY_PORT_BUILTIN_MODULES \
{ MP_OBJ_NEW_QSTR(MP_QSTR_umachine), (mp_obj_t)&machine_module }, \
Expand All @@ -206,6 +207,7 @@ extern const struct _mp_obj_module_t mp_module_uqueue;
{ MP_OBJ_NEW_QSTR(MP_QSTR_ussl), (mp_obj_t)&mp_module_ussl }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uerrno), (mp_obj_t)&mp_module_uerrno }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uqueue), (mp_obj_t)&mp_module_uqueue }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR__onewire), (mp_obj_t)&mp_module_onewire }, \

#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&machine_module }, \
Expand Down
1 change: 1 addition & 0 deletions py/py.mk
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ PY_EXTMOD_O_BASENAME = \
extmod/moduwebsocket.o \
extmod/modwebrepl.o \
extmod/modframebuf.o \
extmod/modonewire.o \
extmod/vfs.o \
extmod/vfs_reader.o \
extmod/vfs_posix.o \
Expand Down

0 comments on commit b26b42e

Please sign in to comment.