/Zephyr-latest/drivers/input/ |
D | input_esp32_touch_sensor.c | 61 const struct esp32_touch_sensor_channel_config *channel_cfg; member 81 const struct esp32_touch_sensor_channel_config *channel_cfg; local 97 channel_cfg = &dev_cfg->channel_cfg[i]; 102 touch_hal_read_benchmark(channel_cfg->channel_num, 104 touch_hal_set_threshold(channel_cfg->channel_num, 105 channel_cfg->channel_sens * benchmark_value / 100); 119 channel_cfg = &dev_cfg->channel_cfg[i]; 120 channel_status = (pad_status >> channel_cfg->channel_num) & 0x01; 127 if (channel_cfg->channel_num == channel_num) { 164 *channel_cfg = &dev_cfg->channel_cfg[key_index]; local [all …]
|
/Zephyr-latest/drivers/dma/ |
D | dma_pl330.c | 168 struct dma_pl330_ch_config *channel_cfg; in dma_pl330_setup_ch() local 172 channel_cfg = &dev_data->channels[ch]; in dma_pl330_setup_ch() 173 dma_exec_addr = channel_cfg->dma_exec_addr; in dma_pl330_setup_ch() 265 struct dma_pl330_ch_config *channel_cfg; in dma_pl330_start_dma_ch() local 269 channel_cfg = &dev_data->channels[ch]; in dma_pl330_start_dma_ch() 283 sys_write32(channel_cfg->dma_exec_addr, in dma_pl330_start_dma_ch() 321 struct dma_pl330_ch_config *channel_cfg; in dma_pl330_xfer() local 326 channel_cfg = &dev_data->channels[channel]; in dma_pl330_xfer() 327 ch_handle = &channel_cfg->internal; in dma_pl330_xfer() 338 dma_pl330_config_channel(channel_cfg, dst, src, size); in dma_pl330_xfer() [all …]
|
D | dma_sam_xdmac.c | 57 struct sam_xdmac_channel_cfg *channel_cfg; in sam_xdmac_isr() local 69 channel_cfg = &dev_data->dma_channels[channel]; in sam_xdmac_isr() 75 if (channel_cfg->callback) { in sam_xdmac_isr() 76 channel_cfg->callback(dev, channel_cfg->user_data, in sam_xdmac_isr() 182 struct sam_xdmac_channel_config channel_cfg; in sam_xdmac_config() local 231 channel_cfg.cfg = in sam_xdmac_config() 238 channel_cfg.cfg = in sam_xdmac_config() 245 channel_cfg.cfg = in sam_xdmac_config() 257 channel_cfg.cfg |= in sam_xdmac_config() 262 channel_cfg.ds_msp = 0U; in sam_xdmac_config() [all …]
|
/Zephyr-latest/drivers/dac/ |
D | dac_stm32.c | 88 const struct dac_channel_cfg *channel_cfg) in dac_stm32_channel_setup() argument 94 if ((channel_cfg->channel_id - STM32_FIRST_CHANNEL >= in dac_stm32_channel_setup() 96 (channel_cfg->channel_id < STM32_FIRST_CHANNEL)) { in dac_stm32_channel_setup() 97 LOG_ERR("Channel %d is not valid", channel_cfg->channel_id); in dac_stm32_channel_setup() 101 if ((channel_cfg->resolution == 8) || in dac_stm32_channel_setup() 102 (channel_cfg->resolution == 12)) { in dac_stm32_channel_setup() 103 data->resolution = channel_cfg->resolution; in dac_stm32_channel_setup() 109 channel = table_channels[channel_cfg->channel_id - STM32_FIRST_CHANNEL]; in dac_stm32_channel_setup() 111 if (channel_cfg->buffered) { in dac_stm32_channel_setup() 121 if (channel_cfg->internal) { in dac_stm32_channel_setup() [all …]
|
D | dac_ad559x.c | 32 const struct dac_channel_cfg *channel_cfg) in dac_ad559x_channel_setup() argument 37 if (channel_cfg->channel_id >= AD559X_PIN_MAX) { in dac_ad559x_channel_setup() 38 LOG_ERR("Invalid channel number %d", channel_cfg->channel_id); in dac_ad559x_channel_setup() 42 if (channel_cfg->resolution != AD559X_DAC_RESOLUTION) { in dac_ad559x_channel_setup() 43 LOG_ERR("Invalid resolution %d", channel_cfg->resolution); in dac_ad559x_channel_setup() 47 if (channel_cfg->internal) { in dac_ad559x_channel_setup() 52 data->dac_conf |= BIT(channel_cfg->channel_id); in dac_ad559x_channel_setup()
|
D | dac_mcux_dac.c | 28 const struct dac_channel_cfg *channel_cfg) in mcux_dac_channel_setup() argument 34 if (channel_cfg->channel_id != 0) { in mcux_dac_channel_setup() 35 LOG_ERR("unsupported channel %d", channel_cfg->channel_id); in mcux_dac_channel_setup() 39 if (channel_cfg->resolution != 12) { in mcux_dac_channel_setup() 40 LOG_ERR("unsupported resolution %d", channel_cfg->resolution); in mcux_dac_channel_setup() 44 if (channel_cfg->internal) { in mcux_dac_channel_setup()
|
D | dac_esp32.c | 38 const struct dac_channel_cfg *channel_cfg) in dac_esp32_channel_setup() argument 42 if (channel_cfg->channel_id > SOC_DAC_CHAN_NUM) { in dac_esp32_channel_setup() 43 LOG_ERR("Channel %d is not valid", channel_cfg->channel_id); in dac_esp32_channel_setup() 47 if (channel_cfg->internal) { in dac_esp32_channel_setup() 52 dac_output_enable(channel_cfg->channel_id); in dac_esp32_channel_setup()
|
D | dac_mcux_lpdac.c | 28 const struct dac_channel_cfg *channel_cfg) in mcux_lpdac_channel_setup() argument 34 if (channel_cfg->channel_id != 0) { in mcux_lpdac_channel_setup() 35 LOG_ERR("unsupported channel %d", channel_cfg->channel_id); in mcux_lpdac_channel_setup() 39 if (channel_cfg->resolution != 12) { in mcux_lpdac_channel_setup() 40 LOG_ERR("unsupported resolution %d", channel_cfg->resolution); in mcux_lpdac_channel_setup() 44 if (channel_cfg->internal) { in mcux_lpdac_channel_setup()
|
D | dac_dacx3608.c | 88 const struct dac_channel_cfg *channel_cfg) in dacx3608_channel_setup() argument 95 if (channel_cfg->channel_id > DACX3608_MAX_CHANNEL - 1) { in dacx3608_channel_setup() 96 LOG_ERR("Unsupported channel %d", channel_cfg->channel_id); in dacx3608_channel_setup() 100 if (channel_cfg->resolution != config->resolution) { in dacx3608_channel_setup() 101 LOG_ERR("Unsupported resolution %d", channel_cfg->resolution); in dacx3608_channel_setup() 105 if (channel_cfg->internal) { in dacx3608_channel_setup() 110 if (data->configured & BIT(channel_cfg->channel_id)) { in dacx3608_channel_setup() 111 LOG_DBG("Channel %d already configured", channel_cfg->channel_id); in dacx3608_channel_setup() 117 BIT(channel_cfg->channel_id), setting); in dacx3608_channel_setup() 123 data->configured |= BIT(channel_cfg->channel_id); in dacx3608_channel_setup() [all …]
|
D | dac_mcux_gau.c | 37 const struct dac_channel_cfg *channel_cfg) in nxp_gau_dac_channel_setup() argument 43 if (channel_cfg->resolution != 10) { in nxp_gau_dac_channel_setup() 48 if (channel_cfg->internal && channel_cfg->buffered) { in nxp_gau_dac_channel_setup() 51 } else if (channel_cfg->buffered) { in nxp_gau_dac_channel_setup() 66 (uint32_t)convert_channel_id(channel_cfg->channel_id), in nxp_gau_dac_channel_setup()
|
D | dac_handlers.c | 14 struct dac_channel_cfg channel_cfg; in z_vrfy_dac_channel_setup() local 17 K_OOPS(k_usermode_from_copy(&channel_cfg, in z_vrfy_dac_channel_setup() 22 &channel_cfg); in z_vrfy_dac_channel_setup()
|
D | dac_mcux_dac32.c | 31 const struct dac_channel_cfg *channel_cfg) in mcux_dac32_channel_setup() argument 37 if (channel_cfg->channel_id != 0) { in mcux_dac32_channel_setup() 38 LOG_ERR("unsupported channel %d", channel_cfg->channel_id); in mcux_dac32_channel_setup() 42 if (channel_cfg->resolution != 12) { in mcux_dac32_channel_setup() 43 LOG_ERR("unsupported resolution %d", channel_cfg->resolution); in mcux_dac32_channel_setup() 47 if (channel_cfg->internal) { in mcux_dac32_channel_setup()
|
D | dac_gd32.c | 101 const struct dac_channel_cfg *channel_cfg) in dac_gd32_channel_setup() argument 105 uint8_t dacx = channel_cfg->channel_id; in dac_gd32_channel_setup() 112 if ((channel_cfg->resolution != 8U) && in dac_gd32_channel_setup() 113 (channel_cfg->resolution != 12U)) { in dac_gd32_channel_setup() 118 if (channel_cfg->internal) { in dac_gd32_channel_setup() 123 data->resolutions[dacx] = channel_cfg->resolution; in dac_gd32_channel_setup()
|
D | dac_ltc166x.c | 55 const struct dac_channel_cfg *channel_cfg) in ltc166x_channel_setup() argument 59 if (channel_cfg->channel_id > config->nchannels - 1) { in ltc166x_channel_setup() 60 LOG_ERR("Unsupported channel %d", channel_cfg->channel_id); in ltc166x_channel_setup() 64 if (channel_cfg->resolution != config->resolution) { in ltc166x_channel_setup() 65 LOG_ERR("Unsupported resolution %d", channel_cfg->resolution); in ltc166x_channel_setup() 69 if (channel_cfg->internal) { in ltc166x_channel_setup()
|
/Zephyr-latest/drivers/adc/ |
D | adc_ifx_cat1.c | 97 const struct adc_channel_cfg *channel_cfg) in ifx_cat1_adc_channel_setup() argument 102 cyhal_gpio_t vplus = CYHAL_GET_GPIO(_ADCSAR_PORT, channel_cfg->input_positive); in ifx_cat1_adc_channel_setup() 103 cyhal_gpio_t vminus = channel_cfg->differential ? in ifx_cat1_adc_channel_setup() 104 CYHAL_GET_GPIO(_ADCSAR_PORT, channel_cfg->input_negative) : in ifx_cat1_adc_channel_setup() 108 if (channel_cfg->reference != ADC_REF_INTERNAL) { in ifx_cat1_adc_channel_setup() 113 if (channel_cfg->gain != ADC_GAIN_1) { in ifx_cat1_adc_channel_setup() 118 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in ifx_cat1_adc_channel_setup() 119 switch (ADC_ACQ_TIME_UNIT(channel_cfg->acquisition_time)) { in ifx_cat1_adc_channel_setup() 121 acquisition_ns = ADC_ACQ_TIME_VALUE(channel_cfg->acquisition_time) * 1000; in ifx_cat1_adc_channel_setup() 124 acquisition_ns = ADC_ACQ_TIME_VALUE(channel_cfg->acquisition_time); in ifx_cat1_adc_channel_setup() [all …]
|
D | adc_ads1x1x.c | 378 const struct adc_channel_cfg *channel_cfg) in ads1x1x_channel_setup() argument 385 if (channel_cfg->channel_id != 0) { in ads1x1x_channel_setup() 386 LOG_ERR("unsupported channel id '%d'", channel_cfg->channel_id); in ads1x1x_channel_setup() 390 if (channel_cfg->reference != ADC_REF_INTERNAL) { in ads1x1x_channel_setup() 391 LOG_ERR("unsupported channel reference type '%d'", channel_cfg->reference); in ads1x1x_channel_setup() 397 if (channel_cfg->differential) { in ads1x1x_channel_setup() 398 if (channel_cfg->input_positive == 0 && channel_cfg->input_negative == 1) { in ads1x1x_channel_setup() 400 } else if (channel_cfg->input_positive == 0 && in ads1x1x_channel_setup() 401 channel_cfg->input_negative == 3) { in ads1x1x_channel_setup() 403 } else if (channel_cfg->input_positive == 1 && in ads1x1x_channel_setup() [all …]
|
D | adc_sam.c | 67 const struct adc_channel_cfg *channel_cfg) in adc_sam_channel_setup() argument 72 uint8_t channel_id = channel_cfg->channel_id; in adc_sam_channel_setup() 74 if (channel_cfg->differential) { in adc_sam_channel_setup() 75 if (channel_id != (channel_cfg->input_positive / 2U) in adc_sam_channel_setup() 76 || channel_id != (channel_cfg->input_negative / 2U)) { in adc_sam_channel_setup() 81 if (channel_id != channel_cfg->input_positive) { in adc_sam_channel_setup() 87 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in adc_sam_channel_setup() 92 if (channel_cfg->reference != ADC_REF_EXTERNAL0) { in adc_sam_channel_setup() 93 LOG_ERR("Invalid ADC channel reference (%d)", channel_cfg->reference); in adc_sam_channel_setup() 98 if (channel_cfg->channel_id == SAM_ADC_TEMP_CHANNEL) { in adc_sam_channel_setup() [all …]
|
D | adc_b91.c | 279 const struct adc_channel_cfg *channel_cfg) in adc_b91_channel_setup() argument 291 if (channel_cfg->channel_id > 0) { in adc_b91_channel_setup() 297 if (channel_cfg->reference != ADC_REF_INTERNAL) { in adc_b91_channel_setup() 332 switch (channel_cfg->gain) { in adc_b91_channel_setup() 345 switch (channel_cfg->acquisition_time) { in adc_b91_channel_setup() 378 input_positive = adc_b91_get_pin(channel_cfg->input_positive); in adc_b91_channel_setup() 379 input_negative = adc_b91_get_pin(channel_cfg->input_negative); in adc_b91_channel_setup() 381 channel_cfg->differential) { in adc_b91_channel_setup() 384 } else if (channel_cfg->differential && (input_negative == (uint8_t)NOINPUTN)) { in adc_b91_channel_setup() 390 data->differential = channel_cfg->differential; in adc_b91_channel_setup() [all …]
|
D | adc_smartbond_sdadc.c | 55 const struct adc_channel_cfg *channel_cfg) in sdadc_smartbond_channel_setup() argument 57 uint8_t channel_id = channel_cfg->channel_id; in sdadc_smartbond_channel_setup() 64 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in sdadc_smartbond_channel_setup() 69 if (channel_cfg->input_positive > SMARTBOND_SDADC_VBAT) { in sdadc_smartbond_channel_setup() 73 if (channel_cfg->differential) { in sdadc_smartbond_channel_setup() 74 if (channel_cfg->input_negative >= SMARTBOND_SDADC_VBAT) { in sdadc_smartbond_channel_setup() 81 if ((channel_cfg->input_positive == SMARTBOND_SDADC_VBAT && in sdadc_smartbond_channel_setup() 82 channel_cfg->gain != ADC_GAIN_1_4) || in sdadc_smartbond_channel_setup() 83 (channel_cfg->input_positive != SMARTBOND_SDADC_VBAT && in sdadc_smartbond_channel_setup() 84 channel_cfg->gain != ADC_GAIN_1)) { in sdadc_smartbond_channel_setup() [all …]
|
D | adc_ads1119.c | 211 const struct adc_channel_cfg *channel_cfg) in ads1119_channel_setup() argument 217 if (channel_cfg->channel_id != 0) { in ads1119_channel_setup() 221 switch (channel_cfg->reference) { in ads1119_channel_setup() 232 if (channel_cfg->differential) { in ads1119_channel_setup() 233 if (channel_cfg->input_positive == 0 && channel_cfg->input_negative == 1) { in ads1119_channel_setup() 235 } else if (channel_cfg->input_positive == 1 && channel_cfg->input_negative == 2) { in ads1119_channel_setup() 237 } else if (channel_cfg->input_positive == 2 && channel_cfg->input_negative == 3) { in ads1119_channel_setup() 243 if (channel_cfg->input_positive == 0) { in ads1119_channel_setup() 245 } else if (channel_cfg->input_positive == 1) { in ads1119_channel_setup() 247 } else if (channel_cfg->input_positive == 2) { in ads1119_channel_setup() [all …]
|
D | adc_ads1112.c | 186 const struct adc_channel_cfg *channel_cfg) in ads1112_channel_setup() argument 192 if (channel_cfg->channel_id != 0) { in ads1112_channel_setup() 196 if (channel_cfg->differential) { in ads1112_channel_setup() 197 if (channel_cfg->input_positive == 0 && channel_cfg->input_negative == 1) { in ads1112_channel_setup() 199 } else if (channel_cfg->input_positive == 2 && channel_cfg->input_negative == 3) { in ads1112_channel_setup() 205 if (channel_cfg->input_positive == 0) { in ads1112_channel_setup() 207 } else if (channel_cfg->input_positive == 1) { in ads1112_channel_setup() 209 } else if (channel_cfg->input_positive == 2) { in ads1112_channel_setup() 216 data->differential = channel_cfg->differential; in ads1112_channel_setup() 218 dr = ads1112_acq_time_to_dr(dev, channel_cfg->acquisition_time); in ads1112_channel_setup() [all …]
|
D | adc_cc13xx_cc26xx.c | 123 const struct adc_channel_cfg *channel_cfg) in adc_cc13xx_cc26xx_channel_setup() argument 126 const uint8_t ch = channel_cfg->channel_id; in adc_cc13xx_cc26xx_channel_setup() 135 switch (ADC_ACQ_TIME_UNIT(channel_cfg->acquisition_time)) { in adc_cc13xx_cc26xx_channel_setup() 137 data->sample_time = (uint16_t)ADC_ACQ_TIME_VALUE(channel_cfg->acquisition_time); in adc_cc13xx_cc26xx_channel_setup() 140 sample_time_us = (uint16_t)ADC_ACQ_TIME_VALUE(channel_cfg->acquisition_time); in adc_cc13xx_cc26xx_channel_setup() 144 ADC_ACQ_TIME_VALUE(channel_cfg->acquisition_time) * 1000); in adc_cc13xx_cc26xx_channel_setup() 165 if (channel_cfg->differential) { in adc_cc13xx_cc26xx_channel_setup() 170 if (channel_cfg->gain != ADC_GAIN_1) { in adc_cc13xx_cc26xx_channel_setup() 175 if (channel_cfg->reference == ADC_REF_INTERNAL) { in adc_cc13xx_cc26xx_channel_setup() 177 } else if (channel_cfg->reference == ADC_REF_VDD_1) { in adc_cc13xx_cc26xx_channel_setup()
|
D | adc_ene_kb1200.c | 139 const struct adc_channel_cfg *channel_cfg) in adc_kb1200_channel_setup() argument 141 if (channel_cfg->channel_id >= ADC_MAX_CHAN) { in adc_kb1200_channel_setup() 142 LOG_ERR("Invalid channel %d.", channel_cfg->channel_id); in adc_kb1200_channel_setup() 146 if (channel_cfg->acquisition_time != ADC_ACQ_TIME_DEFAULT) { in adc_kb1200_channel_setup() 151 if (channel_cfg->differential) { in adc_kb1200_channel_setup() 156 if (channel_cfg->gain != ADC_GAIN_1) { in adc_kb1200_channel_setup() 157 LOG_ERR("Unsupported channel gain %d.", channel_cfg->gain); in adc_kb1200_channel_setup() 161 if (channel_cfg->reference != ADC_REF_INTERNAL) { in adc_kb1200_channel_setup() 165 LOG_DBG("ADC channel %d configured.", channel_cfg->channel_id); in adc_kb1200_channel_setup()
|
D | adc_ads131m02.c | 196 const struct adc_channel_cfg *channel_cfg) in ads131m02_configure_gain() argument 200 switch (channel_cfg->gain) { in ads131m02_configure_gain() 202 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 206 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 210 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 214 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 218 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 222 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 226 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() 230 gain_cfg = ADS131M02_GET_GAIN(channel_cfg->channel_id, in ads131m02_configure_gain() [all …]
|
/Zephyr-latest/include/zephyr/drivers/ |
D | dac.h | 67 const struct dac_channel_cfg *channel_cfg); 104 const struct dac_channel_cfg *channel_cfg); 107 const struct dac_channel_cfg *channel_cfg) in z_impl_dac_channel_setup() argument 112 return api->channel_setup(dev, channel_cfg); in z_impl_dac_channel_setup()
|