ESP32 PSRAM Library
|
Base class that provides print() and println() functionality. More...
#include <Print.h>
Public Member Functions | |
Print () | |
Default constructor. | |
virtual int | availableForWrite () |
Get the number of bytes available in the write buffer. More... | |
void | clearWriteError () |
Clear the write error state. | |
virtual void | flush () |
Flush the output buffer. More... | |
int | getWriteError () |
Get the current write error state. More... | |
virtual bool | outputCanTimeout () |
Check if the output can timeout. More... | |
size_t | print (char) |
Print a single character. More... | |
size_t size_t size_t | print (const __FlashStringHelper *) |
Print a flash string. More... | |
size_t | print (const char[]) |
Print a null-terminated string. More... | |
size_t | print (const Printable &) |
Print a Printable object. More... | |
size_t | print (const String &) |
Print a String object. More... | |
size_t | print (double, int=2) |
Print a floating point value. More... | |
size_t | print (int, int=DEC) |
Print an integer value. More... | |
size_t | print (long long, int=DEC) |
Print a long long integer value. More... | |
size_t | print (long, int=DEC) |
Print a long integer value. More... | |
size_t | print (unsigned char, int=DEC) |
Print an unsigned byte value. More... | |
size_t | print (unsigned int, int=DEC) |
Print an unsigned integer value. More... | |
size_t | print (unsigned long long, int=DEC) |
Print an unsigned long long integer value. More... | |
size_t | print (unsigned long, int=DEC) |
Print an unsigned long integer value. More... | |
size_t | printf (const char *format,...) __attribute__((format(printf |
Print formatted data (printf style) More... | |
size_t size_t | printf_P (PGM_P format,...) __attribute__((format(printf |
Print formatted data from program memory (printf style) More... | |
size_t | println (char) |
Print a single character followed by a newline. More... | |
size_t | println (const __FlashStringHelper *) |
Print a flash string followed by a newline. More... | |
size_t | println (const char[]) |
Print a null-terminated string followed by a newline. More... | |
size_t | println (const Printable &) |
Print a Printable object followed by a newline. More... | |
size_t | println (const String &s) |
Print a String object followed by a newline. More... | |
size_t | println (double, int=2) |
Print a floating point value followed by a newline. More... | |
size_t | println (int, int=DEC) |
Print an integer value followed by a newline. More... | |
size_t | println (long long, int=DEC) |
Print a long long integer value followed by a newline. More... | |
size_t | println (long, int=DEC) |
Print a long integer value followed by a newline. More... | |
size_t | println (unsigned char, int=DEC) |
Print an unsigned byte value followed by a newline. More... | |
size_t | println (unsigned int, int=DEC) |
Print an unsigned integer value followed by a newline. More... | |
size_t | println (unsigned long long, int=DEC) |
Print an unsigned long long integer value followed by a newline. More... | |
size_t | println (unsigned long, int=DEC) |
Print an unsigned long integer value followed by a newline. More... | |
size_t | println (void) |
Print just a newline. More... | |
template<> | |
size_t | printNumber (double number, uint8_t digits) |
Specialized template for printing floating point numbers. More... | |
size_t | write (char c) |
Write a char value as a byte. More... | |
size_t | write (const char *buffer, size_t size) |
Write a buffer of characters to the output. More... | |
size_t | write (const char *str) |
Write a null-terminated string to the output. More... | |
virtual size_t | write (const uint8_t *buffer, size_t size) |
Write a buffer of bytes to the output. More... | |
size_t | write (int t) |
Write an int value as a byte. More... | |
size_t | write (int8_t c) |
Write a signed byte as an unsigned byte. More... | |
size_t | write (long long t) |
Write a long long value as a byte. More... | |
size_t | write (long t) |
Write a long value as a byte. More... | |
size_t | write (short t) |
Write a short value as a byte. More... | |
virtual size_t | write (uint8_t)=0 |
Write a single byte to the output. More... | |
size_t | write (unsigned int t) |
Write an unsigned int value as a byte. More... | |
size_t | write (unsigned long long t) |
Write an unsigned long long value as a byte. More... | |
size_t | write (unsigned long t) |
Write an unsigned long value as a byte. More... | |
size_t | write (unsigned short t) |
Write an unsigned short value as a byte. More... | |
Protected Member Functions | |
void | setWriteError (int err=1) |
Set the write error flag. More... | |
Base class that provides print() and println() functionality.
The Print class is the base class for all Arduino objects that can write output, including Serial, Ethernet clients, and File objects. It provides a common interface for printing various data types to these output destinations.
|
inlinevirtual |
Get the number of bytes available in the write buffer.
Reimplemented in esp32_psram::RingBufferStream< VectorType >.
|
inlinevirtual |
Flush the output buffer.
This function should wait for all outgoing characters to be sent. The output buffer should be empty after this call. Empty implementation by default in Print class.
Reimplemented in esp32_psram::RingBufferStream< VectorType >, and esp32_psram::InMemoryFile< VectorType >.
|
inline |
Get the current write error state.
|
inlinevirtual |
Check if the output can timeout.
By default, write operations can timeout (like for network or serial). Child classes can override this to false (like String).
size_t Print::print | ( | char | ) |
size_t size_t size_t Print::print | ( | const __FlashStringHelper * | ) |
size_t Print::print | ( | const char | [] | ) |
size_t Print::print | ( | const Printable & | ) |
size_t Print::print | ( | const String & | ) |
size_t Print::print | ( | double | , |
int | = 2 |
||
) |
Print a floating point value.
n | Value to print |
digits | Number of decimal places to display (default: 2) |
size_t Print::print | ( | int | , |
int | = DEC |
||
) |
Print an integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | long long | , |
int | = DEC |
||
) |
Print a long long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | long | , |
int | = DEC |
||
) |
Print a long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | unsigned char | , |
int | = DEC |
||
) |
Print an unsigned byte value.
b | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | unsigned int | , |
int | = DEC |
||
) |
Print an unsigned integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | unsigned long long | , |
int | = DEC |
||
) |
Print an unsigned long long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::print | ( | unsigned long | , |
int | = DEC |
||
) |
Print an unsigned long integer value.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::printf | ( | const char * | format, |
... | |||
) |
Print formatted data (printf style)
format | Format string |
... | Variable arguments for format string |
size_t size_t Print::printf_P | ( | PGM_P | format, |
... | |||
) |
Print formatted data from program memory (printf style)
format | Format string in program memory |
... | Variable arguments for format string |
size_t Print::println | ( | char | ) |
Print a single character followed by a newline.
c | Character to print |
size_t Print::println | ( | const __FlashStringHelper * | ) |
Print a flash string followed by a newline.
str | Flash string to print |
size_t Print::println | ( | const char | [] | ) |
Print a null-terminated string followed by a newline.
str | String to print |
size_t Print::println | ( | const Printable & | ) |
Print a Printable object followed by a newline.
obj | Object to print |
size_t Print::println | ( | const String & | s | ) |
Print a String object followed by a newline.
s | String to print |
size_t Print::println | ( | double | , |
int | = 2 |
||
) |
Print a floating point value followed by a newline.
n | Value to print |
digits | Number of decimal places to display (default: 2) |
size_t Print::println | ( | int | , |
int | = DEC |
||
) |
Print an integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | long long | , |
int | = DEC |
||
) |
Print a long long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | long | , |
int | = DEC |
||
) |
Print a long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | unsigned char | , |
int | = DEC |
||
) |
Print an unsigned byte value followed by a newline.
b | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | unsigned int | , |
int | = DEC |
||
) |
Print an unsigned integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | unsigned long long | , |
int | = DEC |
||
) |
Print an unsigned long long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | unsigned long | , |
int | = DEC |
||
) |
Print an unsigned long integer value followed by a newline.
n | Value to print |
base | Number base to use (default: DEC) |
size_t Print::println | ( | void | ) |
Print just a newline.
size_t Print::printNumber | ( | double | number, |
uint8_t | digits | ||
) |
Specialized template for printing floating point numbers.
number | The floating point number to print |
digits | The number of decimal places to display |
|
inlineprotected |
Set the write error flag.
err | Error code to set (default: 1) |
|
inline |
Write a char value as a byte.
c | Character to write |
|
inline |
Write a buffer of characters to the output.
buffer | Pointer to the character buffer |
size | Number of characters to write |
|
inline |
Write a null-terminated string to the output.
str | Pointer to the string to write |
|
virtual |
Write a buffer of bytes to the output.
buffer | Pointer to the data to write |
size | Number of bytes to write |
Reimplemented in esp32_psram::RingBufferStream< VectorType >, and esp32_psram::InMemoryFile< VectorType >.
|
inline |
Write an int value as a byte.
t | Value to write |
|
inline |
Write a signed byte as an unsigned byte.
c | Byte to write |
|
inline |
Write a long long value as a byte.
t | Value to write |
|
inline |
Write a long value as a byte.
t | Value to write |
|
inline |
Write a short value as a byte.
t | Value to write |
|
pure virtual |
Write a single byte to the output.
b | The byte to write |
Implemented in esp32_psram::RingBufferStream< VectorType >, and esp32_psram::InMemoryFile< VectorType >.
|
inline |
Write an unsigned int value as a byte.
t | Value to write |
|
inline |
Write an unsigned long long value as a byte.
t | Value to write |
|
inline |
Write an unsigned long value as a byte.
t | Value to write |
|
inline |
Write an unsigned short value as a byte.
t | Value to write |