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
23
- //| is currently supported. """
22
+ //| :param Architecture arch: The ulp arch. Only `FSM` architecture is currently supported.
23
+ //| """
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 ) {
26
26
enum { ARG_arch };
@@ -72,9 +72,12 @@ 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 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."""
78
81
//| ...
79
82
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
83
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
95
98
//| pins: Sequence[microcontroller.Pin] = ()
96
99
//| ) -> None:
97
100
//| """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.
101
101
//|
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."""
103
109
//| ...
104
110
static mp_obj_t espulp_ulp_run (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
105
111
espulp_ulp_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
0 commit comments