Lines Matching full:gain
24 /* gain to pulse and scale conversion */
29 int gain; member
49 static int hx711_get_gain_to_pulse(int gain) in hx711_get_gain_to_pulse() argument
54 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_pulse()
59 static int hx711_get_gain_to_scale(int gain) in hx711_get_gain_to_scale() argument
64 if (hx711_gain_to_scale[i].gain == gain) in hx711_get_gain_to_scale()
75 return hx711_gain_to_scale[i].gain; in hx711_get_scale_to_gain()
84 int gain_set; /* gain set on device */
85 int gain_chan_a; /* gain for channel A */
207 /* after a reset the gain is 128 */ in hx711_reset()
309 int gain; in hx711_write_raw() local
322 gain = hx711_get_scale_to_gain(val2); in hx711_write_raw()
323 if (gain < 0) { in hx711_write_raw()
325 return gain; in hx711_write_raw()
328 if (gain != hx711_data->gain_set) { in hx711_write_raw()
329 hx711_data->gain_set = gain; in hx711_write_raw()
330 if (gain != 32) in hx711_write_raw()
331 hx711_data->gain_chan_a = gain; in hx711_write_raw()
511 * full scale differential input range: AVDD / GAIN in hx711_probe()
514 * AVDD / GAIN = 2^24 in hx711_probe()
516 * 1 LSB = AVDD / GAIN / 2^24 in hx711_probe()
519 * 1 LSB = (AVDD * 100) / GAIN / 1678 [10^-9 mV] in hx711_probe()
530 ret / hx711_gain_to_scale[i].gain / 1678; in hx711_probe()