Skip to content

Commit 1d33ceb

Browse files
committed
cc3200: Make port-specific modules use MP_REGISTER_MODULE.
Signed-off-by: Jim Mussared <[email protected]>
1 parent 9e4da23 commit 1d33ceb

File tree

7 files changed

+11
-22
lines changed

7 files changed

+11
-22
lines changed

ports/cc3200/mods/modnetwork.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ const mp_obj_module_t mp_module_network = {
159159
.globals = (mp_obj_dict_t*)&mp_module_network_globals,
160160
};
161161

162+
MP_REGISTER_MODULE(MP_QSTR_network, mp_module_network, 1);
163+
162164
#if (MICROPY_PORT_HAS_TELNET || MICROPY_PORT_HAS_FTP)
163165
STATIC const mp_rom_map_elem_t network_server_locals_dict_table[] = {
164166
{ MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&network_server_init_obj) },

ports/cc3200/mods/moduos.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,5 @@ const mp_obj_module_t mp_module_uos = {
179179
.base = { &mp_type_module },
180180
.globals = (mp_obj_dict_t*)&os_module_globals,
181181
};
182+
183+
MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos, 1);

ports/cc3200/mods/modusocket.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,3 +816,5 @@ const mp_obj_module_t mp_module_usocket = {
816816
.base = { &mp_type_module },
817817
.globals = (mp_obj_dict_t*)&mp_module_usocket_globals,
818818
};
819+
820+
MP_REGISTER_MODULE(MP_QSTR_usocket, mp_module_usocket, 1);

ports/cc3200/mods/modussl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,4 @@ const mp_obj_module_t mp_module_ussl = {
161161
.globals = (mp_obj_dict_t*)&mp_module_ussl_globals,
162162
};
163163

164+
MP_REGISTER_MODULE(MP_QSTR_ussl, mp_module_ussl, 1);

ports/cc3200/mods/modutime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,5 @@ const mp_obj_module_t mp_module_utime = {
155155
.base = { &mp_type_module },
156156
.globals = (mp_obj_dict_t*)&time_module_globals,
157157
};
158+
159+
MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1);

ports/cc3200/mods/modwipy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ const mp_obj_module_t wipy_module = {
2828
.base = { &mp_type_module },
2929
.globals = (mp_obj_dict_t*)&wipy_module_globals,
3030
};
31+
32+
MP_REGISTER_MODULE(MP_QSTR_wipy, wipy_module, 1);

ports/cc3200/mpconfigport.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,28 +144,6 @@
144144
#define MICROPY_PORT_BUILTINS \
145145
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, \
146146

147-
// extra built in modules to add to the list of known ones
148-
extern const struct _mp_obj_module_t wipy_module;
149-
extern const struct _mp_obj_module_t mp_module_ure;
150-
extern const struct _mp_obj_module_t mp_module_ujson;
151-
extern const struct _mp_obj_module_t mp_module_uos;
152-
extern const struct _mp_obj_module_t mp_module_utime;
153-
extern const struct _mp_obj_module_t mp_module_uselect;
154-
extern const struct _mp_obj_module_t mp_module_usocket;
155-
extern const struct _mp_obj_module_t mp_module_network;
156-
extern const struct _mp_obj_module_t mp_module_ubinascii;
157-
extern const struct _mp_obj_module_t mp_module_ussl;
158-
159-
#define MICROPY_PORT_BUILTIN_MODULES \
160-
{ MP_ROM_QSTR(MP_QSTR_wipy), MP_ROM_PTR(&wipy_module) }, \
161-
{ MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_uos) }, \
162-
{ MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \
163-
{ MP_ROM_QSTR(MP_QSTR_uselect), MP_ROM_PTR(&mp_module_uselect) }, \
164-
{ MP_ROM_QSTR(MP_QSTR_usocket), MP_ROM_PTR(&mp_module_usocket) }, \
165-
{ MP_ROM_QSTR(MP_QSTR_network), MP_ROM_PTR(&mp_module_network) }, \
166-
{ MP_ROM_QSTR(MP_QSTR_ubinascii), MP_ROM_PTR(&mp_module_ubinascii) }, \
167-
{ MP_ROM_QSTR(MP_QSTR_ussl), MP_ROM_PTR(&mp_module_ussl) }, \
168-
169147
// extra constants
170148
#define MICROPY_PORT_CONSTANTS \
171149
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \

0 commit comments

Comments
 (0)