我正在arduino上做一个程序,为此,我需要更改一个cpp文件,在该cpp文件中,我需要使用EndpointXtract函数,但是我无法使其正常工作,我认为问题出在我通过最后一个参数,那我该怎么做? arduino IDE不会告诉我什么地方出了错,只是退出状态1
我尝试过:
EndpointXtract(1, 0, 0, 0,const &USB_CONFIGURATION_DESCRIPTOR);
void HIDUniversal::EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *pep)
/* Configuration descriptor structure */
typedef struct {
uint8_t bLength; // Length of this descriptor.
uint8_t bDescriptorType; // CONFIGURATION descriptor type
uint16_t wTotalLength; // Total length of all descriptors
uint8_t bNumInterfaces; // Number of interfaces
uint8_t bConfigurationValue; // Value of this configuration
uint8_t iConfiguration; // Index of String Descriptor
uint8_t bmAttributes; // Configuration characteristics.
uint8_t bMaxPower; // Maximum power consumed by this configuration.
} __attribute__((packed)) USB_CONFIGURATION_DESCRIPTOR;