parse_hex_sentence(9)
π parse_hex_sentence(9) β like, the Kernel API Manual page, bestie π
okay so bestie, we're talking about parse_hex_sentence today, and honestly? she's a little icon. the whole gig is converting an ascii hex representation into a byte array. that's it, that's the vibe. π
β¨ NAME β¨
parse_hex_sentence β Convert a ascii hex representation into byte array.
like literally that's her whole personality and she's slaying it π
πΈ SYNOPSIS πΈ
int parse_hex_sentence (const char *in , int isize , u8 *out , int osize
);
yes the spacing is exactly like that, don't come for her π«Ά
π¦ ARGUMENTS π¦
bestie there are four of them, let's go one by one:
inβ the input buffer of ascii. the raw material, the moment, the source β¨isizeβ length of input buffer. you gotta tell her how much ofinactually matters, she's not a mind reader πoutβ the output buffer. this is where the parsed bytes get to live their best life πosizeβ length of output buffer, e.g. max number of bytes to parse. it's giving "know your limits, queen" π
π₯ DESCRIPTION π₯
so an valid input is a series of ascii hexadecimal numbers, separated by spaces. and yes the manpage literally says "an valid input", we're keeping the lore intact, no cap π
an example valid input is:
" 00 f2 0 000076 6 0 ff"
look at all those extra spaces β she does not care, she's unbothered, she's thriving π
β οΈ ok but here's the cautionary tale: if an individual "word" within the hex sentence is longer than MAX_WORD_SIZE, then the sentence is illegal, and parsing will fail. so like... don't test her. she WILL fail on you. fr fr π€
β RETURN β
- number of bytes parsed β slay, success, we ate π
- or a negative error code on failure β not slay, but at least she tells you π
π§ SEE ALSO π§
go be nosy, bestie, iykyk:
- Kernel file
./drivers/platform/chrome/wilco_ec/debugfs.cβ mentioned right there alongsideh1_gpio_get(9),test_event_set(9), andwilco_ec_debugfs_probe(9)π h1_gpio_get(9)test_event_set(9)wilco_ec_debugfs_probe(9)
okay that's the whole page, you're basically an expert now π this cutie lives in ./drivers/platform/chrome/wilco_ec/debugfs.c (source teased as ./drivers/platform/chrome/wilc... in the footer) and she's dated October 2026, manual section parse_hex_sentence(9) β periodt. go forth and parse those hex sentences, bestie, i believe in you π
β¨π
π¦ 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