ads131m_write_reg_unlocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ads131m_write_reg_unlocked(9) πŸ’…

okay so this is a page from the Kernel API Manual bestie, and it is literally about writing one single register and then being a paranoid queen about it and verifying the ACK. obsessed. πŸŽ€


✨ NAME ✨

ads131m_write_reg_unlocked β€” writes a single register and verifies the ACK. no cap, that's the whole job. 🫢


🌸 SYNOPSIS 🌸

int ads131m_write_reg_unlocked (struct ads131m_priv *priv , u8 reg , u16 val );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • priv β€” the device private data structure. it's giving "everything you need to know about this device lives here" energy. πŸ‘‘
  • reg β€” the 8-bit register address. yes bestie, 8-bit, keep it cute. ⭐
  • val β€” the 16-bit value you're gonna write in there. 16-bit, she's bigger. πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so this function performs the full 3-cycle WREG operation with Input CRC. like, the whole ritual. not me doing four steps for three cycles, iykyk 😭

  1. (Cycle 1) Sends WREG command, data, and its calculated CRC. πŸ’…
  2. (Cycle 2) Sends NULL+CRC to retrieve the response from Cycle 1. 🧚
  3. Verifies the response is the correct ACK for the WREG. this is the vibe check fr fr βœ…
  4. (Cycle 3) Sends NULL+CRC to retrieve STATUS and check for CRC_ERR. 🚨
ngl bestie, if the ACK doesn't match or CRC_ERR shows up, that's a whole situation. the function will let you know via that return value below. πŸ’€

🌈 RETURN 🌈

0 on success, or a negative error code. that's it, that's the tea. πŸ“


πŸ’œ SEE ALSO πŸ’œ


anyway mwah πŸ’‹ this little icon came from ./drivers/iio/adc and she's stamped October 2026, ads131m_write_reg_unlocked(9) forever and always, periodt. 🌟🫢

πŸ“¦ where this page comes from