Skip to content

Commit 52878c6

Browse files
committed
fix pre-commit issues
1 parent 1a65c97 commit 52878c6

File tree

2 files changed

+9
-9
lines changed
  • ports/espressif

2 files changed

+9
-9
lines changed

ports/espressif/bindings/espulp/ULP.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//| Raises an exception if another ULP has been instantiated. This
2020
//| ensures that is is only used by one piece of code at a time.
2121
//|
22-
//| :param Architecture arch: The ulp arch. Only `FSM` architecture
22+
//| :param Architecture arch: The ulp arch. Only `FSM` architecture
2323
//| is currently supported."""
2424
//| ...
2525
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) {
7272
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(espulp_ulp___exit___obj, 4, 4, espulp_ulp_obj___exit__);
7373

7474
//| 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."""
7878
//| ...
7979
static mp_obj_t espulp_ulp_set_wakeup_period(mp_obj_t self_in, mp_obj_t period_index, mp_obj_t period_us) {
8080
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
9696
//| ) -> None:
9797
//| """Loads the program into ULP memory and then runs the program.
9898
//| `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.
100100
//| The given pins are claimed and not reset until `halt()` is called.
101101
//|
102102
//| 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
131131
mp_obj_t pin_obj = mp_obj_subscr(pins_in, MP_OBJ_NEW_SMALL_INT(i), MP_OBJ_SENTINEL);
132132
// common-hal checks that pin is free (that way a possible "ULP already running" error
133133
// 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);
135135
const mcu_pin_obj_t *pin = ((const mcu_pin_obj_t *)pin_obj);
136136
if (pin->number >= 32) {
137137
raise_ValueError_invalid_pin();
@@ -146,8 +146,8 @@ static MP_DEFINE_CONST_FUN_OBJ_KW(espulp_ulp_run_obj, 2, espulp_ulp_run);
146146

147147
//| def halt(self) -> None:
148148
//| """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."""
151151
//| ...
152152
static mp_obj_t espulp_ulp_halt(mp_obj_t self_in) {
153153
espulp_ulp_obj_t *self = MP_OBJ_TO_PTR(self_in);

ports/espressif/common-hal/espulp/ULP.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t
7979
// Main purpose of ULP is to run while main cpu is in deep sleep, so
8080
// ensure GPIO Power Domain remains enabled during deep sleep,
8181
// if any GPIO were supplied here.
82-
if (pins_used > 0){
82+
if (pins_used > 0) {
8383
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
8484
}
8585

0 commit comments

Comments
 (0)