19
19
//| Raises an exception if another ULP has been instantiated. This
20
20
//| ensures that is is only used by one piece of code at a time.
21
21
//|
22
- //| :param Architecture arch: The ulp arch. Only `FSM` architecture
22
+ //| :param Architecture arch: The ulp arch. Only `FSM` architecture
23
23
//| is currently supported."""
24
24
//| ...
25
25
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 ) {
@@ -72,9 +72,9 @@ static mp_obj_t espulp_ulp_obj___exit__(size_t n_args, const mp_obj_t *args) {
72
72
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (espulp_ulp___exit___obj , 4 , 4 , espulp_ulp_obj___exit__ ) ;
73
73
74
74
//| def set_wakeup_period(self, period_index: int, period_us: int) -> None:
75
- //| """Sets the wakeup period in microseconds for the ULP.
76
- //| Up to 5 different wakeup periods can be stored (`period_index` = 0..4).
77
- //| By default, period index 0 is used."""
75
+ //| """Sets the wakeup period in microseconds for the ULP.
76
+ //| Up to 5 different wakeup periods can be stored (`period_index` = 0..4).
77
+ //| By default, period index 0 is used."""
78
78
//| ...
79
79
static mp_obj_t espulp_ulp_set_wakeup_period (mp_obj_t self_in , mp_obj_t period_index , mp_obj_t period_us ) {
80
80
espulp_ulp_obj_t * self = MP_OBJ_TO_PTR (self_in );
@@ -96,7 +96,7 @@ static MP_DEFINE_CONST_FUN_OBJ_3(espulp_ulp_set_wakeup_period_obj, espulp_ulp_se
96
96
//| ) -> None:
97
97
//| """Loads the program into ULP memory and then runs the program.
98
98
//| `entry_point` specifies the offset (in bytes) of the first instruction
99
- //| from the start of the program.
99
+ //| from the start of the program.
100
100
//| The given pins are claimed and not reset until `halt()` is called.
101
101
//|
102
102
//| The program will continue to run even when the running Python is halted."""
@@ -131,7 +131,7 @@ static mp_obj_t espulp_ulp_run(size_t n_args, const mp_obj_t *pos_args, mp_map_t
131
131
mp_obj_t pin_obj = mp_obj_subscr (pins_in , MP_OBJ_NEW_SMALL_INT (i ), MP_OBJ_SENTINEL );
132
132
// common-hal checks that pin is free (that way a possible "ULP already running" error
133
133
// is triggered before a possible "Pin in use" error, if ulp.run is called twice with the same pins).
134
- validate_obj_is_pin (pin_obj , MP_QSTR_pin );
134
+ validate_obj_is_pin (pin_obj , MP_QSTR_pin );
135
135
const mcu_pin_obj_t * pin = ((const mcu_pin_obj_t * )pin_obj );
136
136
if (pin -> number >= 32 ) {
137
137
raise_ValueError_invalid_pin ();
@@ -146,8 +146,8 @@ static MP_DEFINE_CONST_FUN_OBJ_KW(espulp_ulp_run_obj, 2, espulp_ulp_run);
146
146
147
147
//| def halt(self) -> None:
148
148
//| """Halts the running program and releases the pins given in `run()`.
149
- //| Note: for the FSM ULP, a running ULP program is not actually interupted .
150
- //| Instead, only the wakeup timer is stopped."""
149
+ //| Note: for the FSM ULP, a running ULP program is not actually interrupted .
150
+ //| Instead, only the wakeup timer is stopped."""
151
151
//| ...
152
152
static mp_obj_t espulp_ulp_halt (mp_obj_t self_in ) {
153
153
espulp_ulp_obj_t * self = MP_OBJ_TO_PTR (self_in );
0 commit comments