KizarmProbe.
 Vše Třídy Soubory Funkce Proměnné Výčty Hodnoty výčtu Definice maker Skupiny Stránky
comp_desc.h
1 #ifndef USB_DESCRIPTORS_H
2 #define USB_DESCRIPTORS_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif //__cplusplus
7 #include <stdint.h>
8 #include "mw_usbd.h"
9 #include "mw_usbd_rom_api.h"
10 #include "app_usbd_cfg.h"
11 
12 #define CDC_FUNCTION_SIZE 0x13
13 #define USB_INTERFACE_ASSOCIATION_DESC_SIZE 8
14 #define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 11
15 
16 struct UsbConfig {
17  uint8_t cfg[USB_CONFIGUARTION_DESC_SIZE];
18 
19  uint8_t as0 [USB_INTERFACE_ASSOCIATION_DESC_SIZE];
20  uint8_t if0 [USB_INTERFACE_DESC_SIZE];
21  uint8_t fd0 [CDC_FUNCTION_SIZE];
22  uint8_t ep1 [USB_ENDPOINT_DESC_SIZE];
23 
24  uint8_t if1 [USB_INTERFACE_DESC_SIZE];
25  uint8_t ep2 [USB_ENDPOINT_DESC_SIZE];
26  uint8_t ep82[USB_ENDPOINT_DESC_SIZE];
27 
28  uint8_t as1 [USB_INTERFACE_ASSOCIATION_DESC_SIZE];
29  uint8_t if2 [USB_INTERFACE_DESC_SIZE];
30  uint8_t fd1 [CDC_FUNCTION_SIZE];
31  uint8_t ep3 [USB_ENDPOINT_DESC_SIZE];
32 
33  uint8_t if3 [USB_INTERFACE_DESC_SIZE];
34  uint8_t ep4 [USB_ENDPOINT_DESC_SIZE];
35  uint8_t ep84[USB_ENDPOINT_DESC_SIZE];
36 
37  uint8_t term;
38 };
39 
41  const uint8_t* device;
42  const uint8_t* config;
43  const uint8_t* string;
44 };
45 
46 extern const struct UsbDescriptors CdcUsbDescriptors;
47 extern const struct UsbConfig CdcConfig;
48 
50 struct CDCIndividual {
51  const uint32_t depth;
52  const uint32_t ep;
53  const uint8_t* if0;
54  const uint8_t* if1;
55 
56  ErrorCode_t (*SetLineCode) (USBD_HANDLE_T hCDC, CDC_LINE_CODING* line_coding);
57  ErrorCode_t (*SetCtrlLineState) (USBD_HANDLE_T hCDC, uint16_t state);
58 
59 };
60 
61 
62 struct CDCAssocField {
63  const struct CDCIndividual iface [2]; // a jejich popis
64 };
65 
66 extern const struct CDCAssocField ciAssoc;
67 
68 #ifdef __cplusplus
69 }
70 #endif //__cplusplus
71 #endif // USB_DESCRIPTORS_H
const uint8_t * string
String deskriptor.
Definition: comp_desc.h:43
#define CDC_FUNCTION_SIZE
Délka CDC.
Definition: usb-desc.h:14
Deskriptory USB systému.
Definition: comp_desc.h:40
uint8_t term
Ukončení
Definition: comp_desc.h:37
Definition: comp_desc.h:62
const struct UsbConfig CdcConfig
Jsou definovány v usb-desc.c.
Definition: comp_desc.c:53
const uint8_t * config
Config deskriptor.
Definition: comp_desc.h:42
uint8_t if1[USB_INTERFACE_DESC_SIZE]
Interface 1.
Definition: comp_desc.h:24
Definition: comp_desc.h:50
uint8_t ep1[USB_ENDPOINT_DESC_SIZE]
Endpoint 1.
Definition: comp_desc.h:22
uint8_t ep3[USB_ENDPOINT_DESC_SIZE]
Endpoint 3.
Definition: comp_desc.h:31
uint8_t ep2[USB_ENDPOINT_DESC_SIZE]
Endpoint 2.
Definition: comp_desc.h:25
const uint8_t * device
Device deskriptor.
Definition: comp_desc.h:41
uint8_t if0[USB_INTERFACE_DESC_SIZE]
Interface 0.
Definition: comp_desc.h:20
const struct UsbDescriptors CdcUsbDescriptors
Jsou definovány v usb-desc.c.
Definition: comp_desc.c:314
uint8_t cfg[USB_CONFIGUARTION_DESC_SIZE]
konfigurace
Definition: comp_desc.h:17
Vnitřní struktury USB driveru.
Definition: comp_desc.h:16