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()
83 int gain_set; /* gain set on device */
84 int gain_chan_a; /* gain for channel A */
206 /* after a reset the gain is 128 */ in hx711_reset()
308 int gain; in hx711_write_raw() local
321 gain = hx711_get_scale_to_gain(val2); in hx711_write_raw()
322 if (gain < 0) { in hx711_write_raw()
324 return gain; in hx711_write_raw()
327 if (gain != hx711_data->gain_set) { in hx711_write_raw()
328 hx711_data->gain_set = gain; in hx711_write_raw()
329 if (gain != 32) in hx711_write_raw()
330 hx711_data->gain_chan_a = gain; in hx711_write_raw()
496 * full scale differential input range: AVDD / GAIN in hx711_probe()
499 * AVDD / GAIN = 2^24 in hx711_probe()
501 * 1 LSB = AVDD / GAIN / 2^24 in hx711_probe()
504 * 1 LSB = (AVDD * 100) / GAIN / 1678 [10^-9 mV] in hx711_probe()
512 ret / hx711_gain_to_scale[i].gain / 1678; in hx711_probe()