/* Enable/disable ADC interrupt. 
param device The pointer to ADC device instance param type The type of interrupt to disable/enable if applicable param state Enable or disable  */
void _adc_async_set_irq_state(struct _adc_async_device *const device, const uint8_t channel, const enum _adc_async_callback_type type, const bool state)
/* Enable/disable ADC interrupt. 
param device The pointer to ADC device instance param type The type of interrupt to disable/enable if applicable param state Enable or disable  */
void _adc_async_set_irq_state(struct _adc_async_device *const device, const uint8_t channel, const enum _adc_async_callback_type type, const bool state)
{
	void *const hw = device->hw;
	if (ADC_ASYNC_DEVICE_MONITOR_CB == type) {
		hri_afec_write_IMR_COMPE_bit(hw, state);
	} else if (ADC_ASYNC_DEVICE_ERROR_CB == type) {
		hri_afec_write_IMR_GOVRE_bit(hw, state);
	} else if (ADC_ASYNC_DEVICE_CONVERT_CB == type) {
		if (state) {
			hri_afec_set_IMR_reg(hw, (0x1u << channel));
		} else {
			hri_afec_clear_IMR_reg(hw, (0x1u << channel));
		}
	}
}