8000 Merge pull request #5281 from capellini/mp-register-module-non-pybadge · domdfcoding/circuitpython@cf7e29d · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit cf7e29d

Browse files
authored
Merge pull request adafruit#5281 from capellini/mp-register-module-non-pybadge
Convert more modules to use MP_REGISTER_MODULE
2 parents 5b2ccf4 + 9002f35 commit cf7e29d

File tree

22 files changed

+120
-238
lines changed

22 files changed

+120
-238
lines changed

py/circuitpy_mpconfig.h

Lines changed: 77 additions & 238 deletions
Large diffs are not rendered by default.

shared-bindings/_eve/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,3 +1105,5 @@ const mp_obj_module_t _eve_module = {
11051105
.base = { &mp_type_module },
11061106
.globals = (mp_obj_dict_t *)&mp_module__eve_globals,
11071107
};
1108+
1109+
MP_REGISTER_MODULE(MP_QSTR__eve, _eve_module, CIRCUITPY__EVE);

shared-bindings/_pew/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ const mp_obj_module_t pew_module = {
< 8000 /div>
6363
.base = { &mp_type_module },
6464
.globals = (mp_obj_dict_t *)&pew_module_globals,
6565
};
66+
67+
MP_REGISTER_MODULE(MP_QSTR__pew, pew_module, CIRCUITPY_PEW);

shared-bindings/aesio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ const mp_obj_module_t aesio_module = {
6363
.base = {&mp_type_module},
6464
.globals = (mp_obj_dict_t *)&aesio_module_globals,
6565
};
66+
67+
MP_REGISTER_MODULE(MP_QSTR_aesio, aesio_module, CIRCUITPY_AESIO);

shared-bindings/alarm/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,5 @@ extern void port_idle_until_interrupt(void);
248248
MP_WEAK void common_hal_alarm_pretending_deep_sleep(void) {
249249
port_idle_until_interrupt();
250250
}
251+
252+
MP_REGISTER_MODULE(MP_QSTR_alarm, alarm_module, CIRCUITPY_ALARM);

shared-bindings/audiopwmio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ const mp_obj_module_t audiopwmio_module = {
5757
.base = { &mp_type_module },
5858
.globals = (mp_obj_dict_t *)&audiopwmio_module_globals,
5959
};
60+
61+
MP_REGISTER_MODULE(MP_QSTR_audiopwmio, audiopwmio_module, CIRCUITPY_AUDIOPWMIO);

shared-bindings/bitops/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ const mp_obj_module_t bitops_module = {
9999
.base = { &mp_type_module },
100100
.globals = (mp_obj_dict_t *)&bitops_module_globals,
101101
};
102+
103+
MP_REGISTER_MODULE(MP_QSTR_bitops, bitops_module, CIRCUITPY_BITOPS);

shared-bindings/camera/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ const mp_obj_module_t camera_module = {
4848
.base = { &mp_type_module },
4949
.globals = (mp_obj_dict_t *)&camera_module_globals,
5050
};
51+
52+
MP_REGISTER_MODULE(MP_QSTR_camera, camera_module, CIRCUITPY_CAMERA);

shared-bindings/canio/__init__.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ MAKE_PRINTER(canio, canio_bus_state);
108108
MAKE_ENUM_TYPE(canio, BusState, canio_bus_state);
109109

110110
STATIC const mp_rom_map_elem_t canio_module_globals_table[] = {
111+
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_canio) },
111112
{ MP_ROM_QSTR(MP_QSTR_BusState), MP_ROM_PTR(&canio_bus_state_type) },
112113
{ MP_ROM_QSTR(MP_QSTR_CAN), MP_ROM_PTR(&canio_can_type) },
113114
{ MP_ROM_QSTR(MP_QSTR_Listener), MP_ROM_PTR(&canio_listener_type) },
@@ -123,3 +124,5 @@ const mp_obj_module_t canio_module = {
123124
.base = { &mp_type_module },
124125
.globals = (mp_obj_dict_t *)&canio_module_globals,
125126
};
127+
128+
MP_REGISTER_MODULE(MP_QSTR_canio, canio_module, CIRCUITPY_CANIO);

shared-bindings/dualbank/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,5 @@ const mp_obj_module_t dualbank_module = {
113113
.base = { &mp_type_module },
114114
.globals = (mp_obj_dict_t *)&dualbank_module_globals,
115115
};
116+
117+
MP_REGISTER_MODULE(MP_QSTR_dualbank, dualbank_module, CIRCUITPY_DUALBANK);

shared-bindings/gnss/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ const mp_obj_module_t gnss_module = {
2929
.base = { &mp_type_module },
3030
.globals = (mp_obj_dict_t *)&gnss_module_globals,
3131
};
32+
33+
MP_REGISTER_MODULE(MP_QSTR_gnss, gnss_module, CIRCUITPY_GNSS);

shared-bindings/i2cperipheral/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ const mp_obj_module_t i2cperipheral_module = {
104104
.base = { &mp_type_module },
105105
.globals = (mp_obj_dict_t *)&i2cperipheral_module_globals,
106106
};
107+
108+
MP_REGISTER_MODULE(MP_QSTR_i2cperipheral, i2cperipheral_module, CIRCUITPY_I2CPERIPHERAL);

shared-bindings/imagecapture/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ const mp_obj_module_t imagecapture_module = {
4545
.base = { &mp_type_module },
4646
.globals = (mp_obj_dict_t *)&imagecapture_module_globals,
4747
};
48+
49+
MP_REGISTER_MODULE(MP_QSTR_imagecapture, imagecapture_module, CIRCUITPY_IMAGECAPTURE);

shared-bindings/ipaddress/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,5 @@ const mp_obj_module_t ipaddress_module = {
111111
.base = { &mp_type_module },
112112
.globals = (mp_obj_dict_t *)&ipaddress_module_globals,
113113
};
114+
115+
MP_REGISTER_MODULE(MP_QSTR_ipaddress, ipaddress_module, CIRCUITPY_IPADDRESS);

shared-bindings/memorymonitor/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ const mp_obj_module_t memorymonitor_module = {
7474
.base = { &mp_type_module },
7575
.globals = (mp_obj_dict_t *)&memorymonitor_module_globals,
7676
};
77+
78+
MP_REGISTER_MODULE(MP_QSTR_memorymonitor, memorymonitor_module, CIRCUITPY_MEMORYMONITOR);

shared-bindings/sdioio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ const mp_obj_module_t sdioio_module = {
4545
.base = { &mp_type_module },
4646
.globals = (mp_obj_dict_t *)&sdioio_module_globals,
4747
};
48+
49+
MP_REGISTER_MODULE(MP_QSTR_sdio, sdioio_module, CIRCUITPY_SDIOIO);

shared-bindings/socketpool/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,5 @@ const mp_obj_module_t socketpool_module = {
5151
.base = { &mp_type_module },
5252
.globals = (mp_obj_dict_t *)&socketpool_globals,
5353
};
54+
55+
MP_REGISTER_MODULE(MP_QSTR_socketpool, socketpool_module, CIRCUITPY_SOCKETPOOL);

shared-bindings/ssl/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ const mp_obj_module_t ssl_module = {
6464
.base = { &mp_type_module },
6565
.globals = (mp_obj_dict_t *)&ssl_globals,
6666
};
67+
68+
MP_REGISTER_MODULE(MP_QSTR_ssl, ssl_module, CIRCUITPY_SSL);

shared-bindings/uheap/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ const mp_obj_module_t uheap_module = {
5757
.base = { &mp_type_module },
5858
.globals = (mp_obj_dict_t *)&uheap_module_globals,
5959
};
60+
61+
MP_REGISTER_MODULE(MP_QSTR_uheap, uheap_module, CIRCUITPY_UHEAP);

shared-bindings/ustack/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ const mp_obj_module_t ustack_module = {
8585
.base = { &mp_type_module },
8686
.globals = (mp_obj_dict_t *)&ustack_module_globals,
8787
};
88+
89+
MP_REGISTER_MODULE(MP_QSTR_ustack, ustack_module, CIRCUITPY_USTACK);

shared-bindings/watchdog/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ const mp_obj_module_t watchdog_module = {
7777
.base = { &mp_type_module },
7878
.globals = (mp_obj_dict_t *)&watchdog_module_globals,
7979
};
80+
81+
MP_REGISTER_MODULE(MP_QSTR_watchdog, watchdog_module, CIRCUITPY_WATCHDOG);

shared-bindings/wifi/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,5 @@ const mp_obj_module_t wifi_module = {
7070
.base = { &mp_type_module },
7171
.globals = (mp_obj_dict_t *)&wifi_module_globals,
7272
};
73+
74+
MP_REGISTER_MODULE(MP_QSTR_wifi, wifi_module, CIRCUITPY_WIFI);

0 commit comments

Comments
 (0)
0