bool imx233_lradc_read_channel_irq(int channel) { return HW_LRADC_CTRL1 & HW_LRADC_CTRL1__LRADCx_IRQ(channel); }
void imx233_lradc_wait_channel(int channel) { /* wait for completion */ while(!(HW_LRADC_CTRL1 & HW_LRADC_CTRL1__LRADCx_IRQ(channel))) yield(); }
void imx233_lradc_clear_channel_irq(int channel) { __REG_CLR(HW_LRADC_CTRL1) = HW_LRADC_CTRL1__LRADCx_IRQ(channel); }
void imx233_lradc_kick_channel(int channel) { __REG_CLR(HW_LRADC_CTRL1) = HW_LRADC_CTRL1__LRADCx_IRQ(channel); __REG_SET(HW_LRADC_CTRL0) = HW_LRADC_CTRL0__SCHEDULE(channel); }