Skip to content

Commit 0c3e525

Browse files
committed
Replace lost Serial.avaiableForWrite() page
Fixes regression of previously reported/fixed issue: arduino/Arduino#3866 Based on https://www.arduino.cc/en/Serial/AvailableForWrite
1 parent 32794d3 commit 0c3e525

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Serial.availableForWrite()
3+
---
4+
:source-highlighter: pygments
5+
:pygments-style: arduino
6+
7+
8+
9+
= availableForWrite()
10+
11+
12+
// OVERVIEW SECTION STARTS
13+
[#overview]
14+
--
15+
16+
[float]
17+
=== Description
18+
Get the number of bytes (characters) available for writing in the serial buffer without blocking the write operation.
19+
[%hardbreaks]
20+
21+
22+
[float]
23+
=== Syntax
24+
`Serial.availableForWrite()`
25+
26+
_Arduino Mega only:_
27+
28+
`Serial1.availableForWrite()` +
29+
`Serial2.availableForWrite()` +
30+
`Serial3.availableForWrite()`
31+
32+
33+
[float]
34+
=== Parameters
35+
Nothing
36+
37+
[float]
38+
=== Returns
39+
The number of bytes available to read .
40+
--
41+
// OVERVIEW SECTION ENDS
42+
43+
44+
// SEE ALSO SECTION
45+
[#see_also]
46+
--
47+
48+
[float]
49+
=== See also
50+
51+
[role="language"]
52+
* #LANGUAGE# link:../begin[begin()] +
53+
* #LANGUAGE# link:../end[end()] +
54+
* #LANGUAGE# link:../read[read()] +
55+
* #LANGUAGE# link:../peek[peek()] +
56+
* #LANGUAGE# link:../flush[flush()] +
57+
* #LANGUAGE# link:../print[print()] +
58+
* #LANGUAGE# link:../println[println()] +
59+
* #LANGUAGE# link:../write[write()] +
60+
* #LANGUAGE# link:../serialEvent[SerialEvent()] +
61+
* #LANGUAGE# link:../../stream/streamavailable[Stream.available()]
62+
63+
--
64+
// SEE ALSO SECTION ENDS

Language/Functions/Communication/serial.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The *Arduino Leonardo* board uses `Serial1` to communicate via TTL (5V) serial o
4040
=== Functions
4141
link:../serial/ifserial[If] (Serial) +
4242
link:../serial/available[available()] +
43+
link:../serial/availableForWrite[availableForWrite()] +
4344
link:../serial/begin[begin()] +
4445
link:../serial/end[end()] +
4546
link:../serial/find[find()] +

0 commit comments

Comments
 (0)