Skip to content

Commit

Permalink
fw/v0: Add CDC serial state notification structure
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
  • Loading branch information
smunaut committed Mar 6, 2024
1 parent 938d746 commit 9a3e752
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions fw/v0/include/no2usb/usb_cdc_proto.h
Expand Up @@ -9,6 +9,8 @@

#pragma once

#include <no2usb/usb_proto.h>


enum usb_cdc_subclass {
USB_CDC_SCLS_DLCM = 0x01, /* Direct Line Control Model */
Expand Down Expand Up @@ -187,6 +189,25 @@ usb_cdc_union_desc_def(0);
#define USB_NOTIF_CDC_LINE_STATE_CHANGE 0x29
#define USB_NOTIF_CDC_CONNECTION_SPEED_CHANGE 0x2A

/* Basically the same as usb_ctrl_req but without alignement requirements */
struct usb_cdc_notif_header {
union {
struct {
uint8_t bmRequestType;
uint8_t bRequest;
};
uint16_t wRequestAndType;
};
uint16_t wValue;
uint16_t wIndex;
uint16_t wLength;
} __attribute__((packed));

struct usb_cdc_notif_serial_state {
struct usb_cdc_notif_header hdr;
uint16_t bits;
} __attribute__((packed));


/* Argument Structures */

Expand Down

0 comments on commit 9a3e752

Please sign in to comment.