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
23- //| is currently supported. """
22+ //| :param Architecture arch: The ulp arch. Only `FSM` architecture is currently supported.
23+ //| """
2424//| ...
2525static 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 ) {
2626 enum { ARG_arch };
@@ -72,9 +72,12 @@ static mp_obj_t espulp_ulp_obj___exit__(size_t n_args, const mp_obj_t *args) {
7272static 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 for the ULP.
76+ //|
77+ //| :param int period_index: = 0..4. Up to 5 different wakeup periods can be stored
78+ //| and used by the wakeup timer.
79+ //| By default, the value stored in period index 0 is used.
80+ //| :param int period_us: The wakeup period given in microseconds."""
7881//| ...
7982static mp_obj_t espulp_ulp_set_wakeup_period (mp_obj_t self_in , mp_obj_t period_index , mp_obj_t period_us ) {
8083 espulp_ulp_obj_t * self = MP_OBJ_TO_PTR (self_in );
@@ -95,11 +98,14 @@ static MP_DEFINE_CONST_FUN_OBJ_3(espulp_ulp_set_wakeup_period_obj, espulp_ulp_se
9598//| pins: Sequence[microcontroller.Pin] = ()
9699//| ) -> None:
97100//| """Loads the program into ULP memory and then runs the program.
98- //| `entry_point` specifies the offset (in bytes) of the first instruction
99- //| from the start of the program.
100- //| The given pins are claimed and not reset until `halt()` is called.
101101//|
102- //| The program will continue to run even when the running Python is halted."""
102+ //| The program will continue to run even Python is halted or in deep-sleep.
103+ //|
104+ //| :param ReadableBuffer program: the ULP binary.
105+ //| :param int entrypoint: Specifies the offset (in bytes) of the first instruction
106+ //| from the start of the program.
107+ //| :param Sequence[microcontroller.Pin] pins: Pins made available to the ULP.
108+ //| The pins are claimed and not reset until `halt()` is called."""
103109//| ...
104110static mp_obj_t espulp_ulp_run (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
105111 espulp_ulp_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
0 commit comments