comedi_bytes_per_scan(9)
β¨ comedi_bytes_per_scan(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's about comedi_bytes_per_scan, and it is literally about figuring out how big a "scan" is in bytes. no cap. let's get into it π«Ά
πΈ NAME πΈ
comedi_bytes_per_scan β get the length of an asynchronous command "scan", in bytes π
π SYNOPSIS π
unsigned int comedi_bytes_per_scan (struct comedi_subdevice *s );
π¦ ARGUMENTS π¦
sβ the COMEDI subdevice. that's the one, that's the whole argument, she's simple and she's iconic π
π DESCRIPTION π
so the way this works: it determines the overall scan length according to the subdevice type and the number of channels in the scan for the current command. both of those things matter, periodt.
for digital input, output, or input/output subdevices, samples for multiple channels are assumed to be packed into one or more unsigned short or unsigned int values β and which one it is depends on the subdevice's SDF_LSAMPL flag β¨
for other types of subdevice, samples are assumed to occupy a whole unsigned short or unsigned int, again according to the SDF_LSAMPL flag. same flag, different packing situation, iykyk π«
and then it returns the overall scan length in bytes. that's the whole vibe check π
π₯ SEE ALSO π₯
kernel file ./drivers/comedi/drivers.c, plus all these besties:
comedi_set_hw_dev(9)comedi_alloc_devpriv(9)comedi_alloc_subdevices(9)comedi_alloc_subdev_readback(9)comedi_readback_insn_read(9)comedi_timeout(9)comedi_dio_insn_config(9)comedi_dio_update_state(9)comedi_bytes_per_scan_cmd(9)comedi_nscans_left(9)comedi_nsamples_left(9)comedi_inc_scan_progress(9)comedi_handle_events(9)comedi_load_firmware(9)__comedi_check_request_region(9)comedi_check_request_region(9)comedi_legacy_detach(9)comedi_auto_config(9)comedi_auto_unconfig(9)comedi_driver_register(9)comedi_driver_unregister(9)
π friendly reminder that__comedi_check_request_region(9)has two leading underscores andcomedi_check_request_region(9)doesn't β they are two different functions, do not come for me, copy them exactly bestie π
and that's the page!! π sign-off time: this one lives in ./drivers/comedi, dated October 2026, from the Kernel API Manual β mwah, go read your kernel source, ily, 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