Lines Matching refs:val1
126 int32_t val1; in mcux_acmp_attr_set() local
137 val1 = val->val1; in mcux_acmp_attr_set()
142 if (val1 >= kACMP_OffsetLevel0 && in mcux_acmp_attr_set()
143 val1 <= kACMP_OffsetLevel1) { in mcux_acmp_attr_set()
144 LOG_DBG("offset = %d", val1); in mcux_acmp_attr_set()
145 data->config.offsetMode = val1; in mcux_acmp_attr_set()
155 if (val1 >= kACMP_HysteresisLevel0 && in mcux_acmp_attr_set()
156 val1 <= kACMP_HysteresisLevel3) { in mcux_acmp_attr_set()
157 LOG_DBG("hysteresis = %d", val1); in mcux_acmp_attr_set()
158 data->config.hysteresisMode = val1; in mcux_acmp_attr_set()
167 if (val1 >= kACMP_VrefSourceVin1 && in mcux_acmp_attr_set()
168 val1 <= kACMP_VrefSourceVin2) { in mcux_acmp_attr_set()
169 LOG_DBG("vref = %d", val1); in mcux_acmp_attr_set()
170 data->dac.referenceVoltageSource = val1; in mcux_acmp_attr_set()
177 if (val1 >= 0 && val1 < MCUX_ACMP_DAC_LEVELS) { in mcux_acmp_attr_set()
178 LOG_DBG("dac = %d", val1); in mcux_acmp_attr_set()
179 data->dac.DACValue = val1; in mcux_acmp_attr_set()
187 if (val1 >= kACMP_PortInputFromDAC && in mcux_acmp_attr_set()
188 val1 <= kACMP_PortInputFromMux) { in mcux_acmp_attr_set()
189 LOG_DBG("pport = %d", val1); in mcux_acmp_attr_set()
190 data->channels.positivePortInput = val1; in mcux_acmp_attr_set()
198 if (val1 >= 0 && val1 < MCUX_ACMP_INPUT_CHANNELS) { in mcux_acmp_attr_set()
199 LOG_DBG("pmux = %d", val1); in mcux_acmp_attr_set()
200 data->channels.plusMuxInput = val1; in mcux_acmp_attr_set()
208 if (val1 >= kACMP_PortInputFromDAC && in mcux_acmp_attr_set()
209 val1 <= kACMP_PortInputFromMux) { in mcux_acmp_attr_set()
210 LOG_DBG("nport = %d", val1); in mcux_acmp_attr_set()
211 data->channels.negativePortInput = val1; in mcux_acmp_attr_set()
219 if (val1 >= 0 && val1 < MCUX_ACMP_INPUT_CHANNELS) { in mcux_acmp_attr_set()
220 LOG_DBG("nmux = %d", val1); in mcux_acmp_attr_set()
221 data->channels.minusMuxInput = val1; in mcux_acmp_attr_set()
229 if (val1 <= 1 && val1 >= 0) { in mcux_acmp_attr_set()
230 LOG_DBG("pdiscrete = %d", val1); in mcux_acmp_attr_set()
231 data->discrete_config.enablePositiveChannelDiscreteMode = val1; in mcux_acmp_attr_set()
238 if (val1 <= 1 && val1 >= 0) { in mcux_acmp_attr_set()
239 LOG_DBG("ndiscrete = %d", val1); in mcux_acmp_attr_set()
240 data->discrete_config.enableNegativeChannelDiscreteMode = val1; in mcux_acmp_attr_set()
247 if (val1 <= kACMP_DiscreteClockFast && val1 >= kACMP_DiscreteClockSlow) { in mcux_acmp_attr_set()
248 LOG_DBG("discreteClk = %d", val1); in mcux_acmp_attr_set()
249 data->discrete_config.clockSource = val1; in mcux_acmp_attr_set()
256 if (val1 <= 1 && val1 >= 0) { in mcux_acmp_attr_set()
257 LOG_DBG("discreteClk = %d", val1); in mcux_acmp_attr_set()
258 data->discrete_config.enableResistorDivider = val1; in mcux_acmp_attr_set()
265 if (val1 <= kACMP_DiscreteSampleTimeAs256T && in mcux_acmp_attr_set()
266 val1 >= kACMP_DiscreteSampleTimeAs1T) { in mcux_acmp_attr_set()
267 LOG_DBG("discrete sampleTime = %d", val1); in mcux_acmp_attr_set()
268 data->discrete_config.sampleTime = val1; in mcux_acmp_attr_set()
275 if (val1 <= kACMP_DiscretePhaseTimeAlt7 && val1 >= kACMP_DiscretePhaseTimeAlt0) { in mcux_acmp_attr_set()
276 LOG_DBG("discrete phase1Time = %d", val1); in mcux_acmp_attr_set()
277 data->discrete_config.phase1Time = val1; in mcux_acmp_attr_set()
284 if (val1 <= kACMP_DiscretePhaseTimeAlt7 && val1 >= kACMP_DiscretePhaseTimeAlt0) { in mcux_acmp_attr_set()
285 LOG_DBG("discrete phase2Time = %d", val1); in mcux_acmp_attr_set()
286 data->discrete_config.phase2Time = val1; in mcux_acmp_attr_set()
316 val->val1 = data->config.offsetMode; in mcux_acmp_attr_get()
321 val->val1 = data->config.hysteresisMode; in mcux_acmp_attr_get()
325 val->val1 = data->dac.referenceVoltageSource; in mcux_acmp_attr_get()
328 val->val1 = data->dac.DACValue; in mcux_acmp_attr_get()
332 val->val1 = data->channels.positivePortInput; in mcux_acmp_attr_get()
336 val->val1 = data->channels.plusMuxInput; in mcux_acmp_attr_get()
340 val->val1 = data->channels.negativePortInput; in mcux_acmp_attr_get()
344 val->val1 = data->channels.minusMuxInput; in mcux_acmp_attr_get()
348 val->val1 = data->discrete_config.enablePositiveChannelDiscreteMode; in mcux_acmp_attr_get()
351 val->val1 = data->discrete_config.enableNegativeChannelDiscreteMode; in mcux_acmp_attr_get()
354 val->val1 = data->discrete_config.clockSource; in mcux_acmp_attr_get()
357 val->val1 = data->discrete_config.enableResistorDivider; in mcux_acmp_attr_get()
360 val->val1 = data->discrete_config.sampleTime; in mcux_acmp_attr_get()
363 val->val1 = data->discrete_config.phase1Time; in mcux_acmp_attr_get()
366 val->val1 = data->discrete_config.phase2Time; in mcux_acmp_attr_get()
410 val->val1 = data->cout ? 1 : 0; in mcux_acmp_channel_get()