__iio_str_to_fixpoint(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __iio_str_to_fixpoint(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's a little helper from the IIO subsystem and honestly? it's giving "tiny function, big job" energy. it takes a string and turns it into a fixed-point number, no cap πŸŽ€


🌸 NAME 🌸

__iio_str_to_fixpoint β€” Parse a fixed-point number from a string πŸ¦‹

like, you hand it text, it hands you back actual numbers. iconic behavior fr fr πŸ’–


✨ SYNOPSIS ✨

int __iio_str_to_fixpoint (const char *str , int fract_mult , int
       *integer , int *fract , bool scale_db );

that's the whole vibe, bestie β€” five params, one int coming back at you πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • str β€” The string to parse πŸ’… this is the raw text going in, the main character of the operation
  • fract_mult β€” Multiplier for the first decimal place, should be a power of 10 ⭐ (so like, keep it a nice clean 10, 100, 1000… iykyk)
  • integer β€” The integer part of the number πŸ”₯ this is where the whole-number chunk lands
  • fract β€” The fractional part of the number πŸ“ this is where the decimal-y bit ends up
  • scale_db β€” True if this should parse as dB 🌈 ok so if you're in decibel territory, this flag's for you
ngl bestie, fract_mult says "should be a power of 10" β€” that's the doc talking, so literally respect it, k? πŸ™ˆ

πŸ’œ RETURN πŸ’œ

0 on success πŸŽ‰ or a negative error code if the string could not be parsed πŸ’€ like if the input is cursed, you get a negative number back, not a crash. slay.


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/iio/industrialio-core.c β€” that's the home base 🏠

and then the whole friend group, no one left out:


so yeah, that's the function πŸ’– short page, but it ate. periodt. πŸ’…

🧚 source & version: ./drivers/iio Β· dated October 2026 Β· paged as __iio_str_to_fixpoint(9) β€” mwah, bye bestie 🫢✨
πŸ“¦ where this page comes from