KizarmProbe.
 Vše Třídy Soubory Funkce Proměnné Výčty Hodnoty výčtu Definice maker Skupiny Stránky
usb-desc.h
Zobrazit dokumentaci tohoto souboru.
1 #ifndef USB_DESCRIPTORS_H
2 #define USB_DESCRIPTORS_H
3 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif //__cplusplus
9 #include <stdint.h>
10 #include "mw_usbd.h"
11 #include "mw_usbd_rom_api.h"
12 #include "app_usbd_cfg.h"
14 #define CDC_FUNCTION_SIZE 0x13
15 struct UsbConfig {
18  uint8_t cfg[USB_CONFIGUARTION_DESC_SIZE];
20  uint8_t if0[USB_INTERFACE_DESC_SIZE];
24  uint8_t ep1[USB_ENDPOINT_DESC_SIZE];
26  uint8_t if1[USB_INTERFACE_DESC_SIZE];
27 
29  uint8_t ep2[USB_ENDPOINT_DESC_SIZE];
31  uint8_t ep3[USB_ENDPOINT_DESC_SIZE];
33  uint8_t term;
34 };
36 struct UsbDescriptors {
38  const uint8_t* device;
40  const uint8_t* config;
42  const uint8_t* string;
43 };
45 extern const struct UsbDescriptors CdcUsbDescriptors;
47 extern const struct UsbConfig CdcConfig;
48 
49 
51 struct CDCIndividual {
52  const uint32_t depth;
53  const uint32_t ep;
54  const uint8_t* if0;
55  const uint8_t* if1;
56 
57  ErrorCode_t (*SetLineCode) (USBD_HANDLE_T hCDC, CDC_LINE_CODING* line_coding);
58  ErrorCode_t (*SetCtrlLineState) (USBD_HANDLE_T hCDC, uint16_t state);
59 
60 };
61 
62 struct CDCAssocField {
63  const struct CDCIndividual iface [1]; // 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 hfd[CDC_FUNCTION_SIZE]
Něco divného.
Definition: usb-desc.h:22
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