Single-session USB transport with bounded input staging. More...

Data Fields | |
| struct usbfs_handle * | handle |
| uint8_t | input_endpoint |
| uint8_t | output_endpoint |
| unsigned | output_packet_size |
| uint32_t | transaction_id |
| uint8_t | buffered [TRANSFER_SIZE] |
| size_t | offset |
| size_t | available |
| uint64_t | deadline_ms |
| unsigned | usb_timeout_ms |
| size_t | max_download |
| bool | closing_session |
Detailed Description
Single-session USB transport with bounded input staging.
Unread bytes occupy buffered[offset..available). They may belong to the next container: USB transfer boundaries need not match PTP containers. The caller owns the handle and maintains one overall operation deadline.
Definition at line 102 of file chdkbridge.c.
Field Documentation
◆ available
| size_t transport::available |
Consumed offset and valid-byte count in buffered.
Definition at line 108 of file chdkbridge.c.
◆ buffered
| uint8_t transport::buffered[TRANSFER_SIZE] |
Fixed 64 KiB receive buffer, never image-sized.
Definition at line 107 of file chdkbridge.c.
◆ closing_session
| bool transport::closing_session |
Definition at line 112 of file chdkbridge.c.
◆ deadline_ms
| uint64_t transport::deadline_ms |
Absolute CLOCK_MONOTONIC deadline in milliseconds.
Definition at line 109 of file chdkbridge.c.
◆ handle
| struct usbfs_handle* transport::handle |
Borrowed handle for the claimed interface.
Definition at line 103 of file chdkbridge.c.
◆ input_endpoint
| uint8_t transport::input_endpoint |
Definition at line 104 of file chdkbridge.c.
◆ max_download
| size_t transport::max_download |
Definition at line 111 of file chdkbridge.c.
◆ offset
| size_t transport::offset |
Definition at line 108 of file chdkbridge.c.
◆ output_endpoint
| uint8_t transport::output_endpoint |
Discovered bulk endpoint addresses.
Definition at line 104 of file chdkbridge.c.
◆ output_packet_size
| unsigned transport::output_packet_size |
Bulk-OUT wMaxPacketSize; zero disables ZLP termination.
Definition at line 105 of file chdkbridge.c.
◆ transaction_id
| uint32_t transport::transaction_id |
Next command ID; OpenSession starts with zero.
Definition at line 106 of file chdkbridge.c.
◆ usb_timeout_ms
| unsigned transport::usb_timeout_ms |
Definition at line 110 of file chdkbridge.c.
The documentation for this struct was generated from the following file:
- modules/chdkbridge/chdkbridge.c