diff options
| author | HiFiPhile <[email protected]> | 2024-04-12 01:15:46 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-26 00:17:50 +0200 |
| commit | 67f32da1b9a460262e028784ffb0386edd507612 (patch) | |
| tree | a464e630789afcac8697757c001dec071528d004 /src/class/cdc/cdc.h | |
| parent | 8b4ca69e56860e12596e2bef63fc155f8dce338c (diff) | |
cdc: add uart status notification support.
Diffstat (limited to 'src/class/cdc/cdc.h')
| -rw-r--r-- | src/class/cdc/cdc.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/class/cdc/cdc.h b/src/class/cdc/cdc.h index 5cbd658fe..f92ab9231 100644 --- a/src/class/cdc/cdc.h +++ b/src/class/cdc/cdc.h @@ -412,6 +412,35 @@ typedef struct TU_ATTR_PACKED TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct"); +//--------------------------------------------------------------------+ +// Notifications +//--------------------------------------------------------------------+ +typedef struct TU_ATTR_PACKED +{ + uint16_t bRxCarrier : 1; + uint16_t bTxCarrier : 1; + uint16_t bBreak : 1; + uint16_t bRingSignal : 1; + uint16_t bFraming : 1; + uint16_t bParity : 1; + uint16_t bOverRun : 1; + uint16_t : 9; +} cdc_uart_state_t; + +typedef struct TU_ATTR_PACKED +{ + uint8_t bmRequestType; + uint8_t bNotification; + uint16_t wValue; + uint16_t wIndex; + uint16_t wLength; + cdc_uart_state_t bmUartState; +} cdc_notif_serial_state_t; + +TU_VERIFY_STATIC(sizeof(cdc_notif_serial_state_t) == 10, "size is not correct"); + +#define CDC_REQ_TYPE_NOTIF 0xA1 ///< Direction IN; Type Class; Recipient Interface + TU_ATTR_PACKED_END // End of all packed definitions TU_ATTR_BIT_FIELD_ORDER_END |
