1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-04 15:24:12 +01:00
Commit Graph

254 Commits

Author SHA1 Message Date
NicoHood
6367168925 Added >64 byte USB_RecvControl() support 2015-12-23 15:31:55 +01:00
Sandeep Mistry
1b63cfa6a4 Cleanup some Stream compiler warnings from #3337 2015-11-23 16:45:29 -05:00
Chris--A
9f8feea8b7 Make protected Stream::parseInt/Float overloads public.
Stream::parseInt & Stream::parseFloat previously had protected
overloads which allowed skipping a custom character. This commit
brings this feature to the public interface.

To keep the public API simpler, the single paramter overload remains
protected. However its functionality is available in the public
interface using the two parameter overload.
2015-11-23 15:46:24 -05:00
Chris--A
7857216e69 This adds control of Stream::parseInt/float lookahead.
Its default is SKIP_ALL which reflects previous versions.
However SKIP_NONE, and SKIP_WHITESPACE can refine this behaviour.

A parameter used in the protected overloads of parseInt/Float has been
changed from `skipChar` to `ignore`.
2015-11-23 15:46:24 -05:00
Chris--A
12d0487258 This is a bug fix which prevents parseFloat from proceeding past
multiple decimals '.' in the stream. Only one can be accepted for
valid decimal numbers.
2015-11-23 15:46:24 -05:00
Chris--A
24a994019f This commit improves the parsing capability by allowing decimals only
prefixed by an '.' character. Previously the preceeding zero must be
present: '0.'
2015-11-23 15:46:23 -05:00
Martino Facchin
b945df9220 [USB] use plugged modules name to create iSerial field 2015-10-21 15:23:56 +02:00
Cristian Maglie
11440d3fd7 [PUSB] Renamed PUSBListNode to PluggableUSBModule 2015-10-12 12:14:07 +02:00
Nico
2cc3bb605b [PUSB] Minor Style change 2015-10-09 22:10:45 +02:00
Cristian Maglie
fb4f5066bf [HID] Improved checks in getDescriptor() method 2015-10-08 16:38:57 +02:00
NicoHood
05477fc85d [PUSB] Removed unnecessary endpoint and interface function 2015-10-07 20:39:50 +02:00
NicoHood
0f9f63f2a5 [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
NicoHood
6151972b74 [PUSB] Changed Interface + Endpoint to unsigned variables
The iterations in the for loop also use unsigned and the setup struct etc as well.
There was no change in HID required since we just init the inherited variables via constructor and the type is never mentioned.
2015-10-07 18:45:10 +02:00
Cristian Maglie
5b1b0330b2 [PUSB] renamed some parameters 2015-10-07 13:21:21 +02:00
NicoHood
8bc21f7e36 Small return value error check correction 2015-10-07 12:39:18 +02:00
NicoHood
7fdb0efc98 Removed not needed public statement for root node 2015-10-03 07:56:48 +02:00
Martino Facchin
65b8430fec [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
214b260a82 [HID] Code cleanup (no semantic changes) 2015-10-02 11:59:23 +02:00
Cristian Maglie
8a5ad75c50 [PUSB] Fixed checks on return values 2015-10-02 11:59:23 +02:00
Cristian Maglie
1851fcc23c [USB] Fixed some compiler warnings 2015-10-02 11:59:23 +02:00
Cristian Maglie
d1f0c6953a [PUSB] Fixed the correct number of endpoints 2015-10-02 11:59:23 +02:00
Cristian Maglie
e823ef0c16 [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
183ec1c83f [PUSB] No more static fields in PluggableUSB class 2015-10-02 11:59:23 +02:00
Cristian Maglie
0369b8ec33 [PUSB] The latest fields are now set via constructor 2015-10-02 11:59:23 +02:00
Cristian Maglie
0dfa815ce4 [PUSB] callbacks are now pure virtual methods
This change allows the compiler to handle callbacks resolution.

Callbacks now must be implemented on the class that extends
PUSBListNode and this is forced by compiler by means of pure
virtual methods.

Also the calls to HID.interface() and HID.endpoint() can now
be simplified to interface() and endpoint() respectively since
the methods are no more static.
2015-10-02 11:59:23 +02:00
Cristian Maglie
6ffd7e39ba [PUSB] replaced u8 with uint8_t 2015-10-02 11:59:22 +02:00
Cristian Maglie
8f259c8a80 [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
5aeff8ec25 [PUSB] Global functions PUSB_* are now methods of PluggableUSB class 2015-10-02 11:59:22 +02:00
Cristian Maglie
3fe6272feb [PUSB] PUSBCallback struct has been merged into PUSBListNode
This slightly simplifies PluggableUSB API.
2015-10-02 11:59:22 +02:00
Nico
d257764862 Removed not used PUSB_Begin() 2015-09-29 17:02:07 +02:00
Cristian Maglie
953e6fa206 [HID] Removed unused PUSBReturn structure 2015-09-28 17:05:35 +02:00
Nico
fa52c41ede Removed not needed Timer warning
Timer is declared above, so nothing is missing here.
2015-09-28 16:30:40 +02:00
Nico
5e1b4c7434 Removed Timer warnings when Timer 2 is not present 2015-09-28 16:30:40 +02:00
Nico
3bbff6fd2a Remove Compiler Warning in Tone.cpp 2015-09-28 16:30:39 +02:00
Nico
900ae49ee7 Fix compiler warning in CDC.cpp 2015-09-28 16:30:39 +02:00
Nico
228fa37568 Fix compiler warnings in USBCore.cpp 2015-09-28 16:30:39 +02:00
Martino Facchin
53049046cb Merge pull request #3864 from facchinm/pulseInLongOVF
fix pulseInLong considering overflow
2015-09-25 16:05:35 +02:00
Cristian Maglie
563a7306b9 Fixed another regression in IPAddress.h
If the includer tries to inlcude IPAddress.h without first including
WString.h the build will fail.
2015-09-24 15:52:32 +02:00
Cristian Maglie
8c3c54ea28 Merge branch 'patch-7' of https://github.com/NicoHood/Arduino 2015-09-21 12:03:26 +02:00
Martino Facchin
480cd227ea fix pulseInLong considering overflow
fixes #3830
2015-09-21 11:59:20 +02:00
Martino Facchin
c7b27431a9 pulseInLong: fix incorrect timeout handling 2015-09-21 10:24:48 +02:00
Nico
8a96e75645 Fix CDC Serial buffer size determination 2015-09-20 11:08:49 +02:00
Nico
441fd561cf Fix HW Serial buffer size determination 2015-09-20 11:07:19 +02:00
Cristian Maglie
3bd810deb8 Merge branch 'ethernet-dns-fix' of https://github.com/cmaglie/Arduino 2015-09-18 11:30:45 +02:00
Cristian Maglie
cc0d3322d1 Fixed wrong condition in turnOffPWM(..)
Fix #2163
2015-09-18 11:01:08 +02:00
Cristian Maglie
e3909b4e2c Added IPAddress::fromString(....) function 2015-09-09 12:03:29 +02:00
Cristian Maglie
f8b764a3a6 ...and also a leading ','... (oops 2)
See #2408
2015-09-01 10:58:48 +02:00
Cristian Maglie
8720384f68 Added missing #ifdef in WInterrupts.c... (oops)
See #2408
2015-09-01 10:11:43 +02:00
Cristian Maglie
53db220016 Added EXTERNAL_NUM_INTERRUPTS for AVR xxU2 series 2015-08-31 18:12:13 +02:00
Andrew J. Kroll
8c440df280 AVR: Faster Interrupts, no size change.
Fixes #2408
2015-08-31 13:55:07 +02:00