ms_sensors_convert_and_read(9)
β¨ ms_sensors_convert_and_read(9) β¨
okay bestie, this is a page from the Kernel API Manual β yes, we're in kernel land, and yes, you're gonna slay it π
πΈ NAME πΈ
ms_sensors_convert_and_read β the ADC conversion & read function, aka the little icon that does the convert-then-read combo for you π
π¦ SYNOPSIS π¦
int ms_sensors_convert_and_read (void *cli , u8 conv , u8 rd , unsigned
int delay , u32 *adc );
π ARGUMENTS π
cliβ pointer to device client. literally the "who am I talking to" pointer π«Άconvβ ADC conversion command. this one depends on the device in use, so no cap, check your device πrdβ ADC read command. also depends on the device in use, iykyk βdelayβ theusleepminimal delay after the conversion command is issued. give it a sec to breathe π€adcβ pointer to the ADC destination value. this is where the good stuff lands π
π₯ DESCRIPTION π₯
so this is the generic ADC conversion & read function for Measurement Specialties devices, and the way it works is honestly so clean:
- it issues the conversion command β¨
- it sleeps the appropriate
delayπ€ - it issues the command to read the ADC π
three steps, no drama, main character energy fr fr π
π RETURN π
0 on success, negative errno otherwise. so if you get anything negative, that's your vibe check failing bestie π
π SEE ALSO π
Kernel file:
./drivers/iio/common/ms_sensors/ms_sensors_i2c.c
and the whole friend group of sibling functions, go say hi π
ms_sensors_reset(9)ms_sensors_read_prom_word(9)ms_sensors_crc_valid(9)ms_sensors_read_serial(9)ms_sensors_write_resolution(9)ms_sensors_show_battery_low(9)ms_sensors_show_heater(9)ms_sensors_write_heater(9)ms_sensors_ht_read_temperature(9)ms_sensors_ht_read_humidity(9)ms_sensors_tp_crc4(9)ms_sensors_tp_crc_valid_112(9)ms_sensors_tp_crc_valid_128(9)ms_sensors_tp_read_prom(9)ms_sensors_read_temp_and_pressure(9)
ngl this list is a whole squad β every single one linked, no cuts, periodt π«Ά
mwah, that's the page π this cutie lives in ./drivers/iio/common/ms_sensors, dated October 2026, and it's filed under ms_sensors_convert_and_read(9) β go forth and convert bestie, you got this π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms