24 #ifdef PLUGGABLE_USB_ENABLED 26 extern uint8_t _initEndpoints[];
28 int PluggableUSB_::getInterface(uint8_t* interfaceCount)
31 PluggableUSBModule* node;
32 for (node = rootNode; node; node = node->next) {
33 int res = node->getInterface(interfaceCount);
41 int PluggableUSB_::getDescriptor(USBSetup&
setup)
43 PluggableUSBModule* node;
44 for (node = rootNode; node; node = node->next) {
45 int ret = node->getDescriptor(setup);
53 void PluggableUSB_::getShortName(
char *iSerialNum)
55 PluggableUSBModule* node;
56 for (node = rootNode; node; node = node->next) {
57 iSerialNum += node->getShortName(iSerialNum);
64 PluggableUSBModule* node;
65 for (node = rootNode; node; node = node->next) {
66 if (node->setup(setup)) {
73 bool PluggableUSB_::plug(PluggableUSBModule *node)
82 PluggableUSBModule *current = rootNode;
83 while (current->next) {
84 current = current->next;
89 node->pluggedInterface = lastIf;
90 node->pluggedEndpoint = lastEp;
91 lastIf += node->numInterfaces;
92 for (uint8_t i = 0; i < node->numEndpoints; i++) {
93 _initEndpoints[lastEp] = node->endpointType[i];
100 PluggableUSB_& PluggableUSB()
102 static PluggableUSB_
obj;
#define CDC_ENPOINT_COUNT
#define CDC_INTERFACE_COUNT
#define CDC_ACM_INTERFACE
#define CDC_FIRST_ENDPOINT