diff options
| author | Rémi Berthoz <[email protected]> | 2026-01-07 17:04:48 +0100 |
|---|---|---|
| committer | Rémi Berthoz <[email protected]> | 2026-01-07 17:36:01 +0100 |
| commit | 0e5241aa83c52792959ad8a2ef0535a3759530a7 (patch) | |
| tree | 9ca0493aa275f540041deddd6cec3371f62797a6 /src/device | |
| parent | 158fe86b55ee4704b57ad07a95ceb546b82534af (diff) | |
Adjust printer device class to 0.20.0 and fix compilation warnings
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/usbd.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h index 3b296feea..d473aea2a 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -292,6 +292,19 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ /* Endpoint In */\ 7, TUSB_DESC_ENDPOINT, _epin, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0 +//--------------------------------------------------------------------+ +// Printer Descriptor Templates +//--------------------------------------------------------------------+ + +#define TUD_PRINTER_DESC_LEN (9 + 7 + 7) // one interface, two endpoints + +#define TUD_PRINTER_DESCRIPTOR(_itfnum, _stridx, _epout, _epin, _epsize) \ + /* Interface */\ + 9, TUSB_DESC_INTERFACE, _itfnum, 0, 2, TUSB_CLASS_PRINTER, 1, 2, _stridx,\ + /* Endpoint Out */\ + 7, TUSB_DESC_ENDPOINT, _epout, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0,\ + /* Endpoint In */\ + 7, TUSB_DESC_ENDPOINT, _epin, TUSB_XFER_BULK, U16_TO_U8S_LE(_epsize), 0 //--------------------------------------------------------------------+ // MTP Descriptor Templates |
