STRUCT AW_BIN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct aw_bin(9) β€” a Kernel API Manual moment

okay so bestie, welcome to struct aw_bin(9)</pink>, from the Kernel API Manual. this is the little struct that's out here doing the absolute most: it stores the data you get from parsing the configuration file. that's it, that's the whole vibe. she's a container, she's iconic, she's holding your parse results for you. πŸŽ€


✨ NAME ✨

struct aw_bin β€” literally the place where the data you got from parsing the configuration file lives. no cap, that's her job. 🫢

✨ SYNOPSIS ✨

struct aw_bin {
    unsigned char chip_type[8];
    unsigned int valid_data_len;
    unsigned int valid_data_addr;
    unsigned int len;
    unsigned char data[];
};

look at her. five members. perfectly balanced. the way that trailing data[] is flexible-array main character energy 😭

✨ Members ✨

  • chip_type β€” an unsigned char[8] holding the frame header info, aka the chip type. it's giving ID badge. πŸ’…
  • valid_data_len β€” an unsigned int, the length of the valid data you get after parsing. how much good stuff did we actually pull out? this tells you. ✨
  • valid_data_addr β€” an unsigned int, the offset address of that valid data (the stuff you got after parsing) relative to info. so it's a little "you are here" map situation. πŸ¦‹
  • len β€” an unsigned int: the size of the bin file you got from the firmware. the whole thing, not just the parsed bit. πŸ“
  • data β€” unsigned char, and it stores the bin file you got from the firmware. yes, the actual payload. she's carrying it. 🧚

✨ SEE ALSO ✨

  • Kernel file ./drivers/iio/proximity/aw96103.c β€” go read her sibling if you wanna see this in the wild, iykyk πŸ‘‘

bestie heads up: data is a flexible array member sitting at the end of the struct β€” it's unsigned char data[] with no size, so don't go assuming there's room unless something's actually allocated it. that's just how the struct is written, not me being dramatic. πŸ™ˆ

🌸 that's the whole page, fr fr. this was struct aw_bin(9) from the Kernel API Manual, brought to you by ./drivers/iio/proximity, dated October 2026. slay, bye πŸ’–

πŸ“¦ where this page comes from