ftdi_stream.c(3)
π ftdi_stream.c(3) π
okay so bestie, welcome to the ftdi_stream.c page from libftdi1 β yes that's the manual name, and yes you're gonna understand it, i promise π«Ά this one's all about streaming data off your FTDI device at high speed, no cap.
β¨ SYNOPSIS β¨
like literally just include these, in this order, bestie:
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <libusb.h>
#include 'ftdi.h'
(yes 'ftdi.h' has single quotes in the original, don't come for me π that's how it's written)
π Classes
struct FTDIStreamStateβ the state struct, she's iconic, she holds everything together π
π¦ Functions
int ftdi_readstream (struct ftdi_context *ftdi, FTDIStreamCallback *callback, void *userdata, int packetsPerTransfer, int numTransfers)
πΈ Function Documentation πΈ
π int ftdi_readstream (struct ftdi_context * ftdi, FTDIStreamCallback * callback, void * userdata, int packetsPerTransfer, int numTransfers)
streaming reading of data from the device β¨
so the vibe here is: this uses asynchronous transfers in libusb-1.0 to get high-performance streaming of data from a device interface back to the PC. like, maximum slay throughput π₯ This function continuously transfers data until either an error occurs or the callback returns a nonzero value β whichever comes first, bestie. And it returns a libusb error code or the callback's return value. periodt.
For every contiguous block of received data, the callback will be invoked. every single one. no skipping π
π Parameters
ftdiβ pointer toftdi_contextcallbackβ to user supplied function for one block of datauserdataβ (that's it, that's the description, she's mysterious like that π)packetsPerTransferβ number of packets per transfernumTransfersβ Number of transfers per callback
π§ Definition
Definition at line 151 of file ftdi_stream.c.
β References
okay so this function references a whole squad, here they all are, exactly, do not lose a single one:
FTDIStreamState::activity, BITMODE_RESET, BITMODE_SYNCFF, FTDIStreamState::callback, FTDIProgressInfo::current, FTDIProgressInfo::currentRate, FTDIProgressInfo::first, ftdi_get_error_string(), ftdi_set_bitmode(), ftdi_tcioflush(), ftdi_context::max_packet_size, ftdi_context::out_ep, FTDIProgressInfo::prev, FTDIStreamState::progress, FTDIStreamState::result, size_and_time::time, size_and_time::totalBytes, FTDIProgressInfo::totalRate, FTDIProgressInfo::totalTime, ftdi_context::type, TYPE_2232H, TYPE_232H, ftdi_context::usb_ctx, ftdi_context::usb_dev, ftdi_context::usb_read_timeout, and FTDIStreamState::userdata.
π Author π
Generated automatically by Doxygen for libftdi1 from the source code. (so like, a robot wrote this, but she ate, ngl π€π )
and that's the whole page bestie!! Version 1.5, dated Wed Nov 6 2024 09:58:53 β shoutout to the source and version, mwah π go stream some data, you got this fr fr π¦β¨π
π¦ where this page comes from
- opensuse-leap 16.0: libftdi1-devel 1.5.42+git.de9f01e-160000.3.2 Β· LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-with-classpath-exception
- opensuse-leap 16.0: libftdi1-devel 1.5.42+git.de9f01e-160000.3.2 Β· LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-with-classpath-exception
- opensuse-leap 16.0: libftdi1-devel 1.5.42+git.de9f01e-160000.3.2 Β· LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-with-classpath-exception
- opensuse-leap 16.0: libftdi1-devel 1.5.42+git.de9f01e-160000.3.2 Β· LGPL-2.1-only AND GPL-2.0-only AND GPL-2.0-with-classpath-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms