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
Sandeep Mistry
435f6790da
Check TXEMPTY flag instead of TXRDY flag on Serial.flush()
...
As suggested by @borisff in #4128 .
2015-11-17 13:21:42 -05:00
Cristian Maglie
f678ad423a
[SAM] Remove useless <cstddef> includes (fix regression)
...
See #4082
2015-11-05 20:07:02 +01:00
Cristian Maglie
b01eda179a
Print not aborting on write failure
...
See #3614
2015-10-26 12:00:47 +01:00
Martino Facchin
775c82bbed
SAM: add iSerial USB field
2015-10-21 16:16:52 +02:00
Martino Facchin
bf609ecc4c
[USB] remove all warnings from SAM USB core
2015-10-12 14:43:24 +02:00
Martino Facchin
b4541209cb
adapt SAM core to PluggableUSB stable API
2015-10-12 14:41:05 +02:00
Cristian Maglie
abe05b90fa
Removed not used PUSB_Begin() (also in SAM)
...
See #3892
2015-09-29 18:50:43 +02:00
Cristian Maglie
953e6fa206
[HID] Removed unused PUSBReturn structure
2015-09-28 17:05:35 +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
Martino Facchin
480cd227ea
fix pulseInLong considering overflow
...
fixes #3830
2015-09-21 11:59:20 +02:00
Martino Facchin
606d56b3e5
SAM: fix pulseInLong timeout using micros()
2015-09-21 11:10:33 +02:00
Cristian Maglie
3bd810deb8
Merge branch 'ethernet-dns-fix' of https://github.com/cmaglie/Arduino
2015-09-18 11:30:45 +02:00
Martino Facchin
d9a7b5df41
Merge pull request #3542 from facchinm/plugUSB_sam
...
Add pluggableUSB capabilities to SAM core
2015-09-10 18:18:31 +02:00
Cristian Maglie
e3909b4e2c
Added IPAddress::fromString(....) function
2015-09-09 12:03:29 +02:00
Martino Facchin
a5ad4744b5
fix OUT endpoints
...
was using only lower 8 bits of configuration registers
2015-09-04 10:03:40 +02:00
Matthijs Kooijman
96f7b966bc
Expose serial settings from CDC virtual serial port
...
This allows a sketch to find out the settings chosen by the USB host
(computer) and act accordingly.
Other than reading the DTR flag and checking if the baudrate is 1200,
the regular CDC code doesn't actually use any of these settings.
By exposing these settings to the sketch, it can for example copy them
to the hardware UART, turning the Leonardo into a proper USB-to-serial
device. This can be useful to let the computer directly talk to whatever
device is connected to the hardware serial port (like an XBee module).
The Teensy core already supported these methods. This code was
independently developed, but the method names were chosen to match the
Teensy code, for compatibility (except that `dtr()` and `rtr()` return
`bool`, while the Teensy version return a `uint8_t`).
This change is applied to both the avr and sam cores, which have a very
similar CDC implementation.
2015-07-31 13:40:43 +02:00
Martino Facchin
2acda414aa
port PluggableUSB to sam core
2015-07-17 12:16:38 +02:00
Martino Facchin
a261e6cf7c
remove HID from core
2015-07-17 12:16:09 +02:00
Matthijs Kooijman
ebeb7843d2
Check for __cplusplus >= 201103L as well as __GXX_EXPERIMENTAL_CXX0X__
...
Gcc 4.8 defines __cplusplus as 201103L, so we can check for that now. It
still also defines __GXX_EXPERIMENTAL_CXX0X__, but this could help on
other compilers, or if gcc ever decides to stop defining the
experimental macro.
2015-07-16 13:06:10 +02:00
Cristian Maglie
2cbdc121e9
Fixed unused variables warnings and indentation
2015-05-29 20:02:50 +02:00
Martino Facchin
a7d81d0b1c
pulseIn: add alternative implementation based on micros()
2015-05-29 15:01:38 +02:00
Martino Facchin
bb3963c0e9
pulseIn: add ASM implementation for Due
2015-05-29 15:01:38 +02:00
Christopher Andrews
527c7c2572
Updated printLn on SAM core
2015-05-23 01:56:06 +10:00
Cristian Maglie
977ccc6910
Added missing license on samd's pgmspace.h
...
Fixes #3145
2015-05-19 20:01:50 +02:00
Martino Facchin
7f8cba667d
Due watchdog: change flags to effectively reset board
2015-05-08 14:16:12 +02:00
Bob Cousins
d2c510d166
Add Due watchdog functions; modified according to feedback supplied
2015-05-08 14:16:12 +02:00
Cristian Maglie
c944a4c84d
Updated Stream.cpp in SAM core to the latest version
2015-04-21 18:11:05 +02:00
Martino Facchin
ab5aea40a6
Stream: set findMulti function as protected
...
let's not expose it until the API is not accepted
widely by the dev mailing list
2015-03-24 17:13:14 +01:00
Jim Leonard (Xuth)
f43a7a698e
Fix findUntil in Stream library
...
PR #2696 without timeout-related changes
2015-03-24 12:31:50 +01:00
Cristian Maglie
e93be4855f
Corrected some email contacts.
2015-02-05 16:47:22 +01:00
Cristian Maglie
0e013406bc
Merge branch 'sam-usart-mode-fix' into ide-1.5.x
2015-01-19 13:43:42 +01:00
Cristian Maglie
00f23d3aad
sam: Fixed initialization of UART/USART mode register
2015-01-14 00:08:59 +01:00
Chris
7e9cf6d612
sam: updated UART/USART modes
2015-01-09 20:25:09 +00:00
Cristian Maglie
20ac20f629
Arduino custom type boolean is now mapped to bool type
...
Fixes #2151
Fixes #2147
2015-01-07 14:56:19 +01:00
Cristian Maglie
5e97168fbc
sam: USART modes now fails if used on UART
2015-01-06 15:47:44 +01:00
Cristian Maglie
37ea166e19
sam: refined UART/USART class inheritance
...
Let Usart inherit all methods from Uart.
2015-01-05 15:35:32 +01:00
Cristian Maglie
16d836108f
sam: fix code format and indent in UART/USART class
2015-01-05 15:34:09 +01:00
Collin Kidder
cabfd8ed21
Fixed flush so that it actually is sure to flush all outstanding data.
2015-01-04 13:37:28 -05:00
Collin Kidder
76280e8778
Correct an issue where write could send data out of order.
2014-12-31 08:42:26 -05:00
Collin Kidder
eff20deb27
Add ability to set interrupt priority for UART/USARTs.
2014-12-24 10:36:40 -05:00
Collin Kidder
2fedb00552
Switch all of the transmit interrupt code to UARTClass. Also, turn USARTClass into a stub because it did nothing differently from the UART code anyway. Now all serial ports use transmit interrupts.
2014-12-24 10:20:37 -05:00
Collin Kidder
bb341c6d92
Modifications to make serial transmit interrupt work more reliably. Also, added the availableForWrite function.
2014-12-23 22:37:58 -05:00
Collin Kidder
4eb05c303b
Change RingBuffer to have buffer size of 128 and also set its members volatile since they are all accessed and modified in interrupt handlers.
2014-12-23 22:36:35 -05:00
Collin Kidder
065459c18f
Implement transmit buffering with interrupts for USART devices
2014-12-21 20:57:08 -05:00
George Chailazopoulos
2c289ace73
Add #include "Print.h" in Server.h
2014-09-26 22:59:02 +03:00
Cristian Maglie
84518e442c
Fixed attribution rights for SAM delayMicroseconds function
2014-09-16 12:31:16 +02:00