Commit Graph

22 Commits

Author SHA1 Message Date
Martino Facchin b9bb55584c [USB] use plugged modules name to create iSerial field 2015-10-21 15:23:56 +02:00
Cristian Maglie 80e228483d [PUSB] Renamed PUSBListNode to PluggableUSBModule 2015-10-12 12:14:07 +02:00
NicoHood fdb1fd384b [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 f0f10cb290 [PUSB] renamed some parameters 2015-10-07 13:21:21 +02:00
NicoHood b2e48cd627 Small return value error check correction 2015-10-07 12:39:18 +02:00
Martino Facchin a6c4a6395e [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 efe6bc0b7b [PUSB] Fixed checks on return values 2015-10-02 11:59:23 +02:00
Cristian Maglie 3cce436602 [PUSB] Fixed the correct number of endpoints 2015-10-02 11:59:23 +02:00
Cristian Maglie 4d6ab7431b [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 c5fd3853e6 [PUSB] No more static fields in PluggableUSB class 2015-10-02 11:59:23 +02:00
Cristian Maglie 4245515325 [PUSB] replaced u8 with uint8_t 2015-10-02 11:59:22 +02:00
Cristian Maglie 6d4cbd0ee5 [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 9b4c249090 [PUSB] Global functions PUSB_* are now methods of PluggableUSB class 2015-10-02 11:59:22 +02:00
Cristian Maglie c25a5eefc7 [PUSB] PUSBCallback struct has been merged into PUSBListNode
This slightly simplifies PluggableUSB API.
2015-10-02 11:59:22 +02:00
Martino Facchin a83da2c299 fix pluggableUSB linked list 2015-07-16 13:13:52 +02:00
Martino Facchin 512e369e80 rename Setup typedef struct to USBSetup
was really too common
2015-07-16 13:13:52 +02:00
Martino Facchin 880b0468fe fix HID descriptors bigger than 127 bytes 2015-07-16 13:13:51 +02:00
Martino Facchin fa573da910 rework PUSBCallbacks initialization 2015-07-16 13:13:39 +02:00
Martino Facchin 1e08066640 add numInterfaces field to PUSBCallbacks 2015-07-16 13:12:15 +02:00
Martino Facchin d13b52085e implement PUSB modules as linked list 2015-07-16 13:12:14 +02:00
Martino Facchin d1f15236ee remove useless variables 2015-07-16 13:12:14 +02:00
Martino Facchin f7631cdee9 add PluggableUSB module 2015-07-16 13:12:14 +02:00