hdlc_tx_frames(9)
π hdlc_tx_frames β the kernel API manual (section 9, bestie) π
okay so real talk, we're in the kernel API manual, section 9, and today's main character is hdlc_tx_frames. she encodes an HDLC frame and queues it up for transmission. that's it, that's the vibe. let's go β¨
πΈ NAME πΈ
hdlc_tx_frames β encode a frame and queue it for transmission, HDLC style. literally her whole job π
π¦ SYNOPSIS π¦
int hdlc_tx_frames (struct gb_beagleplay *bg , u8 address , u8 control ,
const struct hdlc_payload payloads[] , size_t count );
β¨ ARGUMENTS β¨
bgβ the beagleplay greybus driver. your whole little greybus situation, handed to you πaddressβ the HDLC address field. yes, THE address field πcontrolβ the HDLC control field. iconic, no notes π«Άpayloadsβ an array of payload buffers. plural, she contains multitudes πcountβ how many payloads are in that array. the number. the count. iykyk β
π₯ DESCRIPTION π₯
okay so here's the tea β β this function sleeps outside the spinlock until there's enough circular-buffer space available. not inside the spinlock. outside. we do NOT sleep in atomic context in this house π ββοΈ
then, once she's got the space, she verifies that space under the lock and writes the entire frame atomically. so: either a whole complete frame gets enqueued, or nothing gets written at all. no half-frames, no partial mess, no crumbs left behind π§ it's giving "all or nothing" and honestly? obsessed.
that combo is the whole point β it avoids both sleeping in atomic context and partial frames. two problems, one slay πβ¨
and the returns, bestie:0on success.-EAGAINif the buffer is still full after retries. that's it, that's the whole mood π
π SEE ALSO π
the whole friend group, no cap β starting with the kernel file ./drivers/greybus/gb-beagleplay.c, then:
struct gb_beagleplay(9)struct hdlc_payload(9)struct hdlc_greybus_frame(9)enum cc1352_bootloader_cmd(9)enum cc1352_bootloader_status(9)struct cc1352_bootloader_packet(9)struct cc1352_bootloader_download_cmd_data(9)struct cc1352_bootloader_crc32_cmd_data(9)hdlc_write(9)hdlc_append(9)hdlc_encoded_length(9)csum8(9)cc1352_bootloader_pkt_rx(9)gb_message_send(9)cc1352_bootloader_empty_pkt(9)
and that's the page, bestie π«Ά this lore drop came to you from./drivers/greybus, stamped October 2026 βhdlc_tx_frames(9), periodt. now go encode something atomic π
π¦ 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