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
76ca382f
Commit
76ca382f
authored
8 years ago
by
Sandeep Mistry
Browse files
Options
Downloads
Patches
Plain Diff
Add Uart::availableForWrite()
parent
2df644e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cores/arduino/Uart.cpp
+5
-0
5 additions, 0 deletions
cores/arduino/Uart.cpp
cores/arduino/Uart.h
+1
-0
1 addition, 0 deletions
cores/arduino/Uart.h
with
6 additions
and
0 deletions
cores/arduino/Uart.cpp
+
5
−
0
View file @
76ca382f
...
...
@@ -77,6 +77,11 @@ int Uart::available()
return
rxBuffer
.
available
();
}
int
Uart
::
availableForWrite
()
{
return
(
sercom
->
isDataRegisterEmptyUART
()
?
1
:
0
);
}
int
Uart
::
peek
()
{
return
rxBuffer
.
peek
();
...
...
This diff is collapsed.
Click to expand it.
cores/arduino/Uart.h
+
1
−
0
View file @
76ca382f
...
...
@@ -32,6 +32,7 @@ class Uart : public HardwareSerial
void
begin
(
unsigned
long
baudrate
,
uint16_t
config
);
void
end
();
int
available
();
int
availableForWrite
();
int
peek
();
int
read
();
void
flush
();
...
...
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