|
78 | 78 | //| sideset_pin_count: int = 1,
|
79 | 79 | //| initial_sideset_pin_state: int = 0,
|
80 | 80 | //| initial_sideset_pin_direction: int = 0x1f,
|
| 81 | +//| sideset_enable: bool = False, |
81 | 82 | //| exclusive_pin_use: bool = True,
|
82 | 83 | //| auto_pull: bool = False,
|
83 | 84 | //| pull_threshold: int = 32,
|
|
107 | 108 | //| :param int initial_set_pin_state: the initial output value for set pins starting at first_set_pin
|
108 | 109 | //| :param int initial_set_pin_direction: the initial output direction for set pins starting at first_set_pin
|
109 | 110 | //| :param ~microcontroller.Pin first_sideset_pin: the first pin to use with a side set
|
110 |
| -//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin |
| 111 | +//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin. Does not include sideset enable |
111 | 112 | //| :param int initial_sideset_pin_state: the initial output value for sideset pins starting at first_sideset_pin
|
112 | 113 | //| :param int initial_sideset_pin_direction: the initial output direction for sideset pins starting at first_sideset_pin
|
| 114 | +//| :param bool sideset_enable: True when the top sideset bit is to enable. This should be used with the ".side_set # opt" directive |
113 | 115 | //| :param ~microcontroller.Pin jmp_pin: the pin which determines the branch taken by JMP PIN instructions
|
114 | 116 | //| :param bool exclusive_pin_use: When True, do not share any pins with other state machines. Pins are never shared with other peripherals
|
115 | 117 | //| :param bool auto_pull: When True, automatically load data from the tx FIFO into the
|
@@ -147,6 +149,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
|
147 | 149 | ARG_pull_in_pin_up, ARG_pull_in_pin_down,
|
148 | 150 | ARG_first_set_pin, ARG_set_pin_count, ARG_initial_set_pin_state, ARG_initial_set_pin_direction,
|
149 | 151 | ARG_first_sideset_pin, ARG_sideset_pin_count, ARG_initial_sideset_pin_state, ARG_initial_sideset_pin_direction,
|
| 152 | + ARG_sideset_enable, |
150 | 153 | ARG_jmp_pin,
|
151 | 154 | ARG_exclusive_pin_use,
|
152 | 155 | ARG_auto_pull, ARG_pull_threshold, ARG_out_shift_right,
|
@@ -178,6 +181,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
|
178 | 181 | { MP_QSTR_initial_sideset_pin_state, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
|
179 | 182 | { MP_QSTR_initial_sideset_pin_direction, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x1f} },
|
180 | 183 |
|
| 184 | + { MP_QSTR_sideset_enable, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, |
| 185 | + |
181 | 186 | { MP_QSTR_jmp_pin, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
|
182 | 187 |
|
183 | 188 | { MP_QSTR_exclusive_pin_use, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} },
|
@@ -257,6 +262,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n
|
257 | 262 | first_in_pin, args[ARG_in_pin_count].u_int, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int,
|
258 | 263 | first_set_pin, args[ARG_set_pin_count].u_int, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int,
|
259 | 264 | first_sideset_pin, args[ARG_sideset_pin_count].u_int, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int,
|
| 265 | + args[ARG_sideset_enable].u_bool, |
260 | 266 | jmp_pin,
|
261 | 267 | 0,
|
262 | 268 | args[ARG_exclusive_pin_use].u_bool,
|
|
0 commit comments