Make kitchen_sink check param assertions, and include all headers - fix sign-compare warnings (#316)
This commit is contained in:
@ -320,7 +320,7 @@ static inline void sm_config_set_out_shift(pio_sm_config *c, bool shift_right, b
|
||||
* \param join Specifies the join type. \see enum pio_fifo_join
|
||||
*/
|
||||
static inline void sm_config_set_fifo_join(pio_sm_config *c, enum pio_fifo_join join) {
|
||||
valid_params_if(PIO, join >= PIO_FIFO_JOIN_NONE && join <= PIO_FIFO_JOIN_RX);
|
||||
valid_params_if(PIO, join == PIO_FIFO_JOIN_NONE || join == PIO_FIFO_JOIN_TX || join == PIO_FIFO_JOIN_RX);
|
||||
c->shiftctrl = (c->shiftctrl & (uint)~(PIO_SM0_SHIFTCTRL_FJOIN_TX_BITS | PIO_SM0_SHIFTCTRL_FJOIN_RX_BITS)) |
|
||||
(((uint)join) << PIO_SM0_SHIFTCTRL_FJOIN_TX_LSB);
|
||||
}
|
||||
@ -350,7 +350,7 @@ static inline void sm_config_set_out_special(pio_sm_config *c, bool sticky, bool
|
||||
* \param status_n parameter for the mov status operation (currently a bit count)
|
||||
*/
|
||||
static inline void sm_config_set_mov_status(pio_sm_config *c, enum pio_mov_status_type status_sel, uint status_n) {
|
||||
valid_params_if(PIO, status_sel >= STATUS_TX_LESSTHAN && status_sel <= STATUS_RX_LESSTHAN);
|
||||
valid_params_if(PIO, status_sel == STATUS_TX_LESSTHAN || status_sel == STATUS_RX_LESSTHAN);
|
||||
c->execctrl = (c->execctrl
|
||||
& ~(PIO_SM0_EXECCTRL_STATUS_SEL_BITS | PIO_SM0_EXECCTRL_STATUS_N_BITS))
|
||||
| ((((uint)status_sel) << PIO_SM0_EXECCTRL_STATUS_SEL_LSB) & PIO_SM0_EXECCTRL_STATUS_SEL_BITS)
|
||||
|
Reference in New Issue
Block a user