i2c_smbus_pec(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i2c_smbus_pec(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's a tiny little function from the i2c crew and it is, no cap, doing exactly one job and doing it iconically πŸŽ€


✨ NAME ✨

i2c_smbus_pec β€” Incremental CRC8 over the given input data array 🌸

like, that's the whole vibe. it crunches a CRC8, and it does it incrementally β€” as in, you can feed it in pieces. main character energy fr πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

u8 i2c_smbus_pec (u8 crc , u8 *p , size_t count );

look at her go 😭 returns a u8, takes three args, no drama πŸ’œ


πŸŽ€ ARGUMENTS πŸŽ€

  • crc β€” the previous return crc8 value. yes bestie, the previous one β€” you're picking up where you left off 🫢
  • p β€” pointer to data buffer. that's your data, right there πŸ“
  • count β€” number of bytes in data buffer. how much of p we're actually looking at πŸ‘‘

🌈 DESCRIPTION 🌈

Incremental CRC8 over count bytes in the array pointed to by p ✨

that's it. that's the whole thing. little function, big slay πŸ”₯


πŸ’– SEE ALSO πŸ’–

Kernel file ./drivers/i2c/i2c-core-smbus.c β€” that's where she lives, go say hi πŸ‘‹

and her whole friend group, fr fr:

the whole squad, assembled πŸ§šπŸ’«


ngl there are no warnings, no bugs, no exit statuses here β€” she's a pure little checksum girlie and she said what she said πŸ’…

okay that's the page!! mwah πŸ’‹ this lil gem lives in ./drivers/i2c and the manual says October 2026 β€” so mark your calendar bestie, and remember: incremental CRC8 is a lifestyle πŸŒŸπŸ“πŸ¦‹

πŸ“¦ where this page comes from