|
33 | 33 | #include "py/objproperty.h"
|
34 | 34 |
|
35 | 35 | //| class ULP:
|
36 |
| -//| def __init__(self, arch: ULPArch = ULPArch.FSM): |
| 36 | +//| def __init__(self, arch: Architecture = Architecture.FSM): |
37 | 37 | //| """The ultra-low-power processor.
|
38 | 38 | //|
|
39 | 39 | //| Raises an exception if another ULP has been instantiated. This
|
40 | 40 | //| ensures that is is only used by one piece of code at a time.
|
41 | 41 | //|
|
42 |
| -//| :param ULPArch arch: The ulp arch""" |
| 42 | +//| :param Architecture arch: The ulp arch""" |
43 | 43 | //| ...
|
44 | 44 | STATIC mp_obj_t espulp_ulp_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
|
45 | 45 | enum { ARG_arch };
|
46 | 46 | static const mp_arg_t allowed_args[] = {
|
47 |
| - { MP_QSTR_arch, MP_ARG_OBJ, {.u_obj = (void *)&ulparch_FSM_obj} }, |
| 47 | + { MP_QSTR_arch, MP_ARG_OBJ, {.u_obj = (void *)&architecture_FSM_obj} }, |
48 | 48 | };
|
49 | 49 |
|
50 | 50 | mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
|
51 | 51 | mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
|
52 | 52 |
|
53 |
| - const espulp_ulparch_t arch = cp_enum_value(&espulp_ulparch_type, args[ARG_arch].u_obj, MP_QSTR_arch); |
| 53 | + const espulp_architecture_t arch = cp_enum_value(&espulp_architecture_type, args[ARG_arch].u_obj, MP_QSTR_arch); |
54 | 54 |
|
55 | 55 | espulp_ulp_obj_t *self = m_new_obj(espulp_ulp_obj_t);
|
56 | 56 | self->base.type = &espulp_ulp_type;
|
@@ -149,27 +149,27 @@ STATIC mp_obj_t espulp_ulp_halt(mp_obj_t self_in) {
|
149 | 149 | }
|
150 | 150 | STATIC MP_DEFINE_CONST_FUN_OBJ_1(espulp_ulp_halt_obj, espulp_ulp_halt);
|
151 | 151 |
|
152 |
| -//| arch: ULPArch |
153 |
| -//| """The ulp arch. (read-only)""" |
| 152 | +//| arch: Architecture |
| 153 | +//| """The ulp architecture. (read-only)""" |
154 | 154 | //|
|
155 | 155 | STATIC mp_obj_t espulp_ulp_get_arch(mp_obj_t self_in) {
|
156 | 156 | espulp_ulp_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
157 | 157 | check_for_deinit(self);
|
158 | 158 |
|
159 |
| - return cp_enum_find(&espulp_ulparch_type, self->arch); |
| 159 | + return cp_enum_find(&espulp_architecture_type, self->arch); |
160 | 160 | }
|
161 | 161 | MP_DEFINE_CONST_FUN_OBJ_1(espulp_ulp_get_arch_obj, espulp_ulp_get_arch);
|
162 | 162 |
|
163 | 163 | MP_PROPERTY_GETTER(espulp_ulp_arch_obj,
|
164 | 164 | (mp_obj_t)&espulp_ulp_get_arch_obj);
|
165 | 165 |
|
166 | 166 | STATIC const mp_rom_map_elem_t espulp_ulp_locals_table[] = {
|
167 |
| - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&espulp_ulp_deinit_obj) }, |
168 |
| - { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&mp_identity_obj) }, |
169 |
| - { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&espulp_ulp___exit___obj) }, |
170 |
| - { MP_ROM_QSTR(MP_QSTR_run), MP_ROM_PTR(&espulp_ulp_run_obj) }, |
171 |
| - { MP_ROM_QSTR(MP_QSTR_halt), MP_ROM_PTR(&espulp_ulp_halt_obj) }, |
172 |
| - { MP_ROM_QSTR(MP_QSTR_arch), MP_ROM_PTR(&espulp_ulp_arch_obj) }, |
| 167 | + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&espulp_ulp_deinit_obj) }, |
| 168 | + { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&mp_identity_obj) }, |
| 169 | + { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&espulp_ulp___exit___obj) }, |
| 170 | + { MP_ROM_QSTR(MP_QSTR_run), MP_ROM_PTR(&espulp_ulp_run_obj) }, |
| 171 | + { MP_ROM_QSTR(MP_QSTR_halt), MP_ROM_PTR(&espulp_ulp_halt_obj) }, |
| 172 | + { MP_ROM_QSTR(MP_QSTR_arch), MP_ROM_PTR(&espulp_ulp_arch_obj) }, |
173 | 173 | };
|
174 | 174 | STATIC MP_DEFINE_CONST_DICT(espulp_ulp_locals_dict, espulp_ulp_locals_table);
|
175 | 175 |
|
|
0 commit comments