diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2021-07-14 14:38:38 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-09-19 19:06:01 +1000 |
| commit | 662b9761b37b054f08fe2f7c00d0fce3a418d0b0 (patch) | |
| tree | 3ab168faeb26685d511bf47caa21d2eabdd86c69 /ports/esp8266/machine_hspi.c | |
| parent | cdb880789f61ee037cc7905ad75a7a9201d12ba5 (diff) | |
all: Make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE.
In preparation for upcoming rework of mp_obj_type_t layout.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'ports/esp8266/machine_hspi.c')
| -rw-r--r-- | ports/esp8266/machine_hspi.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ports/esp8266/machine_hspi.c b/ports/esp8266/machine_hspi.c index 3ff76f5a0..c0d4a677e 100644 --- a/ports/esp8266/machine_hspi.c +++ b/ports/esp8266/machine_hspi.c @@ -175,13 +175,14 @@ STATIC const mp_machine_spi_p_t machine_hspi_p = { .transfer = machine_hspi_transfer, }; -const mp_obj_type_t machine_hspi_type = { - { &mp_type_type }, - .name = MP_QSTR_HSPI, - .print = machine_hspi_print, - .make_new = machine_hspi_make_new, - .protocol = &machine_hspi_p, - .locals_dict = (mp_obj_dict_t *)&mp_machine_spi_locals_dict, -}; +MP_DEFINE_CONST_OBJ_TYPE( + machine_hspi_type, + MP_QSTR_HSPI, + MP_TYPE_FLAG_NONE, + machine_hspi_make_new, + print, machine_hspi_print, + protocol, &machine_hspi_p, + locals_dict, (mp_obj_dict_t *)&mp_machine_spi_locals_dict + ); #endif // MICROPY_PY_MACHINE_SPI |
