172
172
#define MICROPY_PORT_BUILTINS \
173
173
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
174
174
175
- // extra built in modules to add to the list of known ones
176
- extern const struct _mp_obj_module_t pyb_module ;
177
- extern const struct _mp_obj_module_t stm_module ;
178
- extern const struct _mp_obj_module_t mp_module_ubinascii ;
179
- extern const struct _mp_obj_module_t mp_module_ure ;
180
- extern const struct _mp_obj_module_t mp_module_uzlib ;
181
- extern const struct _mp_obj_module_t mp_module_ujson ;
182
- extern const struct _mp_obj_module_t mp_module_uheapq ;
183
- extern const struct _mp_obj_module_t mp_module_uhashlib ;
184
- extern const struct _mp_obj_module_t mp_module_utime ;
185
- extern const struct _mp_obj_module_t mp_module_usocket ;
186
- extern const struct _mp_obj_module_t mp_module_network ;
187
- extern const struct _mp_obj_module_t mp_module_onewire ;
188
-
189
175
#if MICROPY_PY_PYB
190
- #define PYB_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) },
176
+ extern const struct _mp_obj_module_t pyb_module ;
177
+ #define PYB_BUILTIN_MODULE_CONSTANTS \
178
+ { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) },
191
179
#else
192
- #define PYB_BUILTIN_MODULE
180
+ #define PYB_BUILTIN_MODULE_CONSTANTS
193
181
#endif
194
182
195
183
#if MICROPY_PY_STM
196
- #define STM_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_stm), MP_ROM_PTR(&stm_module) },
184
+ extern const struct _mp_obj_module_t stm_module ;
185
+ #define STM_BUILTIN_MODULE_CONSTANTS \
186
+ { MP_ROM_QSTR(MP_QSTR_stm), MP_ROM_PTR(&stm_module) },
197
187
#else
198
- #define STM_BUILTIN_MODULE
188
+ #define STM_BUILTIN_MODULE_CONSTANTS
199
189
#endif
200
190
201
191
#if MICROPY_PY_MACHINE
@@ -206,12 +196,6 @@ extern const struct _mp_obj_module_t mp_module_onewire;
206
196
#define MACHINE_BUILTIN_MODULE_CONSTANTS
207
197
#endif
208
198
209
- #if MICROPY_PY_UTIME
210
- #define UTIME_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) },
211
- #else
212
- #define UTIME_BUILTIN_MODULE
213
- #endif
214
-
215
199
#if defined(MICROPY_HW_ETH_MDC )
216
200
extern const struct _mp_obj_type_t network_lan_type ;
217
201
#define MICROPY_HW_NIC_ETH { MP_ROM_QSTR(MP_QSTR_LAN), MP_ROM_PTR(&network_lan_type) },
@@ -244,16 +228,11 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_cc3k;
244
228
#define MICROPY_HW_NIC_CC3K
245
229
#endif
246
230
247
- #define MICROPY_PORT_BUILTIN_MODULES \
248
- PYB_BUILTIN_MODULE \
249
- STM_BUILTIN_MODULE \
250
- UTIME_BUILTIN_MODULE \
251
-
252
231
// extra constants
253
232
#define MICROPY_PORT_CONSTANTS \
254
233
MACHINE_BUILTIN_MODULE_CONSTANTS \
255
- PYB_BUILTIN_MODULE \
256
- STM_BUILTIN_MODULE \
234
+ PYB_BUILTIN_MODULE_CONSTANTS \
235
+ STM_BUILTIN_MODULE_CONSTANTS \
257
236
258
237
#ifndef MICROPY_BOARD_NETWORK_INTERFACES
259
238
#define MICROPY_BOARD_NETWORK_INTERFACES
0 commit comments