STRUCT AW_BIN(9)
π 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β anunsigned char[8]holding the frame header info, aka the chip type. it's giving ID badge. πvalid_data_lenβ anunsigned 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β anunsigned int, the offset address of that valid data (the stuff you got after parsing) relative toinfo. so it's a little "you are here" map situation. π¦lenβ anunsigned 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:datais a flexible array member sitting at the end of the struct β it'sunsigned 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
- 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