Lines Matching full:invert
59 bool invert; member
135 * When invert is active, use the midpoint floor so that in envelope_detector_setup_compare()
138 * ceiling when invert is not active so that env->level in envelope_detector_setup_compare()
141 env->level = (env->high + env->low + !env->invert) / 2; in envelope_detector_setup_compare()
149 ret = iio_write_channel_raw(env->dac, env->invert ? 0 : env->dac_max); in envelope_detector_setup_compare()
177 if (!envelope_detector_comp_latch(env) ^ !env->invert) in envelope_detector_timeout()
196 * When invert is active, start with high=max+1 and low=0 in envelope_detector_read_raw()
199 * start with high=max and low=-1 when invert is not active in envelope_detector_read_raw()
206 env->high = env->dac_max + env->invert; in envelope_detector_read_raw()
207 env->low = -1 + env->invert; in envelope_detector_read_raw()
214 *val = env->invert ? env->dac_max - env->level : env->level; in envelope_detector_read_raw()
236 return sprintf(buf, "%u\n", env->invert); in envelope_show_invert()
245 unsigned long invert; in envelope_store_invert() local
249 ret = kstrtoul(buf, 0, &invert); in envelope_store_invert()
252 if (invert > 1) in envelope_store_invert()
255 trigger = invert ? env->comp_irq_trigger_inv : env->comp_irq_trigger; in envelope_store_invert()
258 if (invert != env->invert) in envelope_store_invert()
261 env->invert = invert; in envelope_store_invert()
302 { .name = "invert",