Martino Facchin
ced062988b
[USB] use plugged modules name to create iSerial field
2015-10-21 15:23:56 +02:00
Cristian Maglie
2e755384f5
[PUSB] Renamed PUSBListNode to PluggableUSBModule
2015-10-12 12:14:07 +02:00
NicoHood
dfe89ddd01
[PUSB] Made getDescriptor() and setup() more flexible
...
Alternatively we can only pass the wIndex to getDescriptor but I suggest to just pass the pointer aka reference of the whole setup.
In guess (havent tested this) that this results in more or less the code size but its a) idential with the other functions and b) we late have more flexibility here.
The Code got a quick SerialKeyboard.ino test
2015-10-07 19:02:40 +02:00
Cristian Maglie
663c55706b
[PUSB] renamed some parameters
2015-10-07 13:21:21 +02:00
NicoHood
eb084e235d
Small return value error check correction
2015-10-07 12:39:18 +02:00
Martino Facchin
8cab209ef9
[PUSB] Fix static initialization order fiasco
...
For details see:
https://isocpp.org/wiki/faq/ctors#static-init-order-on-first-use
2015-10-02 11:59:24 +02:00
Cristian Maglie
bad9b58ce3
[PUSB] Fixed checks on return values
2015-10-02 11:59:23 +02:00
Cristian Maglie
cabae13e55
[PUSB] Fixed the correct number of endpoints
2015-10-02 11:59:23 +02:00
Cristian Maglie
e42d7d6221
[PUSB] Fixed check for available endpoints
...
The check for available slot in PluggableUSB is done on the endpoint
and not on the number of plugged modules.
The modulesCount field is no longer useful and it has been removed.
2015-10-02 11:59:23 +02:00
Cristian Maglie
c0f9296ae5
[PUSB] No more static fields in PluggableUSB class
2015-10-02 11:59:23 +02:00
Cristian Maglie
7fee0f0a75
[PUSB] replaced u8 with uint8_t
2015-10-02 11:59:22 +02:00
Cristian Maglie
34a75d9416
[PUSB] Selected interface and endpoint are now part of PUSBListNode
...
The method
int8_t PluggableUSB::addFunction(PUSBListNode *, uint8_t *)
has been changed to
bool PluggableUSB::plug(PUSBListNode *node)
since both EP and Interfaces are now saved directly into node
2015-10-02 11:59:22 +02:00
Cristian Maglie
c07f988609
[PUSB] Global functions PUSB_* are now methods of PluggableUSB class
2015-10-02 11:59:22 +02:00
Cristian Maglie
7302965552
[PUSB] PUSBCallback struct has been merged into PUSBListNode
...
This slightly simplifies PluggableUSB API.
2015-10-02 11:59:22 +02:00
Martino Facchin
b0bdb47694
fix pluggableUSB linked list
2015-07-16 13:13:52 +02:00
Martino Facchin
3cf30dff25
rename Setup typedef struct to USBSetup
...
was really too common
2015-07-16 13:13:52 +02:00
Martino Facchin
30ebf7f924
fix HID descriptors bigger than 127 bytes
2015-07-16 13:13:51 +02:00
Martino Facchin
d269ed2854
rework PUSBCallbacks initialization
2015-07-16 13:13:39 +02:00
Martino Facchin
8fbc30bd8a
add numInterfaces field to PUSBCallbacks
2015-07-16 13:12:15 +02:00
Martino Facchin
b38d7f07f0
implement PUSB modules as linked list
2015-07-16 13:12:14 +02:00
Martino Facchin
353ef39c23
remove useless variables
2015-07-16 13:12:14 +02:00
Martino Facchin
d3815e7e36
add PluggableUSB module
2015-07-16 13:12:14 +02:00