while ((lpc_ssp->sr & (1 << LPC_SSP_SR_RNE)) == 0) \
; \
/* receive a byte */ \
- get lpc_ssp->dr; \
+ get (uint8_t) lpc_ssp->dr; \
} \
/* Wait for the SSP to go idle (it already should be) */ \
while (lpc_ssp->sr & (1 << LPC_SSP_SR_BSY)); \
lpc_scb.ssp0clkdiv = 1;
/* Reset the device */
- lpc_scb.presetctrl &= ~(1 << LPC_SCB_PRESETCTRL_SSP0_RST_N);
+ lpc_scb.presetctrl &= ~(1UL << LPC_SCB_PRESETCTRL_SSP0_RST_N);
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP0_RST_N);
ao_spi_channel_init(0);
#endif
lpc_scb.ssp1clkdiv = 1;
/* Reset the device */
- lpc_scb.presetctrl &= ~(1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
+ lpc_scb.presetctrl &= ~(1UL << LPC_SCB_PRESETCTRL_SSP1_RST_N);
lpc_scb.presetctrl |= (1 << LPC_SCB_PRESETCTRL_SSP1_RST_N);
ao_spi_channel_init(1);
#endif /* HAS_SPI_1 */