Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Arduino Core for SAMD21 CPU
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
josc941e
Arduino Core for SAMD21 CPU
Commits
4bba56fd
Commit
4bba56fd
authored
9 years ago
by
Tom Keddie
Committed by
Cristian Maglie
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix
https://github.com/arduino/ArduinoCore-samd/issues/83
by changing to 16 bits
parent
3ea315a0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cores/arduino/HardwareSerial.h
+1
-1
1 addition, 1 deletion
cores/arduino/HardwareSerial.h
cores/arduino/Uart.cpp
+4
-4
4 additions, 4 deletions
cores/arduino/Uart.cpp
cores/arduino/Uart.h
+4
-4
4 additions, 4 deletions
cores/arduino/Uart.h
with
9 additions
and
9 deletions
cores/arduino/HardwareSerial.h
+
1
−
1
View file @
4bba56fd
...
...
@@ -68,7 +68,7 @@ class HardwareSerial : public Stream
{
public:
virtual
void
begin
(
unsigned
long
);
virtual
void
begin
(
unsigned
long
baudrate
,
uint
8
_t
config
);
virtual
void
begin
(
unsigned
long
baudrate
,
uint
16
_t
config
);
virtual
void
end
();
virtual
int
available
(
void
)
=
0
;
virtual
int
peek
(
void
)
=
0
;
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/Uart.cpp
+
4
−
4
View file @
4bba56fd
...
...
@@ -34,7 +34,7 @@ void Uart::begin(unsigned long baudrate)
begin
(
baudrate
,
(
uint8_t
)
SERIAL_8N1
);
}
void
Uart
::
begin
(
unsigned
long
baudrate
,
uint
8
_t
config
)
void
Uart
::
begin
(
unsigned
long
baudrate
,
uint
16
_t
config
)
{
pinPeripheral
(
uc_pinRX
,
g_APinDescription
[
uc_pinRX
].
ulPinType
);
pinPeripheral
(
uc_pinTX
,
g_APinDescription
[
uc_pinTX
].
ulPinType
);
...
...
@@ -93,7 +93,7 @@ size_t Uart::write(const uint8_t data)
return
1
;
}
SercomNumberStopBit
Uart
::
extractNbStopBit
(
uint
8
_t
config
)
SercomNumberStopBit
Uart
::
extractNbStopBit
(
uint
16
_t
config
)
{
switch
(
config
&
HARDSER_STOP_BIT_MASK
)
{
...
...
@@ -106,7 +106,7 @@ SercomNumberStopBit Uart::extractNbStopBit(uint8_t config)
}
}
SercomUartCharSize
Uart
::
extractCharSize
(
uint
8
_t
config
)
SercomUartCharSize
Uart
::
extractCharSize
(
uint
16
_t
config
)
{
switch
(
config
&
HARDSER_DATA_MASK
)
{
...
...
@@ -126,7 +126,7 @@ SercomUartCharSize Uart::extractCharSize(uint8_t config)
}
}
SercomParityMode
Uart
::
extractParity
(
uint
8
_t
config
)
SercomParityMode
Uart
::
extractParity
(
uint
16
_t
config
)
{
switch
(
config
&
HARDSER_PARITY_MASK
)
{
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/Uart.h
+
4
−
4
View file @
4bba56fd
...
...
@@ -29,7 +29,7 @@ class Uart : public HardwareSerial
public:
Uart
(
SERCOM
*
_s
,
uint8_t
_pinRX
,
uint8_t
_pinTX
,
SercomRXPad
_padRX
,
SercomUartTXPad
_padTX
);
void
begin
(
unsigned
long
baudRate
);
void
begin
(
unsigned
long
baudrate
,
uint
8
_t
config
);
void
begin
(
unsigned
long
baudrate
,
uint
16
_t
config
);
void
end
();
int
available
();
int
peek
();
...
...
@@ -51,7 +51,7 @@ class Uart : public HardwareSerial
SercomRXPad
uc_padRX
;
SercomUartTXPad
uc_padTX
;
SercomNumberStopBit
extractNbStopBit
(
uint
8
_t
config
);
SercomUartCharSize
extractCharSize
(
uint
8
_t
config
);
SercomParityMode
extractParity
(
uint
8
_t
config
);
SercomNumberStopBit
extractNbStopBit
(
uint
16
_t
config
);
SercomUartCharSize
extractCharSize
(
uint
16
_t
config
);
SercomParityMode
extractParity
(
uint
16
_t
config
);
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment