@@ -58,6 +58,9 @@ enum pio_fifo_join {
58
58
PIO_FIFO_JOIN_RX = 2 ,
59
59
};
60
60
61
+ /** \brief MOV status types
62
+ * \ingroup hardware_pio
63
+ */
61
64
enum pio_mov_status_type {
62
65
STATUS_TX_LESSTHAN = 0 ,
63
66
STATUS_RX_LESSTHAN = 1
@@ -308,7 +311,7 @@ static inline void sm_config_set_out_shift(pio_sm_config *c, bool shift_right, b
308
311
* \param join Specifies the join type. \see enum pio_fifo_join
309
312
*/
310
313
static inline void sm_config_set_fifo_join (pio_sm_config * c , enum pio_fifo_join join ) {
311
- valid_params_if (PIO , join >= 0 && join <= 2 );
314
+ valid_params_if (PIO , join >= PIO_FIFO_JOIN_NONE && join <= PIO_FIFO_JOIN_RX );
312
315
c -> shiftctrl = (c -> shiftctrl & (uint )~(PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS )) |
313
316
(((uint )join ) << PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB );
314
317
}
@@ -334,10 +337,11 @@ static inline void sm_config_set_out_special(pio_sm_config *c, bool sticky, bool
334
337
* \ingroup sm_config
335
338
*
336
339
* \param c Pointer to the configuration structure to modify
337
- * \param status_sel the status operation selector
340
+ * \param status_sel the status operation selector. \see enum pio_mov_status_type
338
341
* \param status_n parameter for the mov status operation (currently a bit count)
339
342
*/
340
343
static inline void sm_config_set_mov_status (pio_sm_config * c , enum pio_mov_status_type status_sel , uint status_n ) {
344
+ valid_params_if (PIO , join >= STATUS_TX_LESSTHAN && join <= STATUS_RX_LESSTHAN );
341
345
c -> execctrl = (c -> execctrl
342
346
& ~(PIO_SM0_EXECCTRL_STATUS_SEL_BITS | PIO_SM0_EXECCTRL_STATUS_N_BITS ))
343
347
| ((((uint )status_sel ) << PIO_SM0_EXECCTRL_STATUS_SEL_LSB ) & PIO_SM0_EXECCTRL_STATUS_SEL_BITS )
0 commit comments