47 void begin(u32 baudRate = 115200);
91 size_t write(
const u8* buffer,
size_t size);
98 size_t print(
const char* str);
131 size_t println(
const char* str);
179 template<
typename... Args>
190 bool flush(u32 timeoutMs = 1000);
198 explicit operator bool()
const;
276template<
typename... Args>
291 return print(buffer);
303#if !FL_HAS_INCLUDE(<Arduino.h>)
304#define Serial fl::fl_serial
int peek()
Peek at next byte without removing it from buffer.
bool flush(u32 timeoutMs=1000)
Wait for serial output to complete.
void begin(u32 baudRate=115200)
Initialize serial communication.
fl::string readString()
Read all available bytes into a string.
size_t print(const char *str)
Print string to serial output.
float parseFloat()
Parse floating-point number from serial input.
size_t println()
Print newline only.
fl::string readStringUntil(char delimiter)
Read characters until delimiter is found.
void setTimeout(u32 timeoutMs)
Set timeout for read operations.
size_t write(u8 byte)
Write single byte to serial output.
size_t readBytesUntil(char delimiter, u8 *buffer, size_t length)
Read bytes until delimiter is found.
long parseInt()
Parse integer from serial input.
size_t printf(const char *format, Args... args)
Print formatted string to serial output (printf-style)
int available()
Check how many bytes are available to read.
void end()
Close serial communication.
int read()
Read next byte from serial input.
size_t readBytes(u8 *buffer, size_t length)
Read fixed number of bytes into buffer.
Arduino-compatible Serial class for cross-platform serial I/O.
fl::UISlider length("Length", 1.0f, 0.0f, 1.0f, 0.01f)
constexpr int type_rank< T >::value
int snprintf(char *buffer, fl::size size, const char *format, const Args &... args) FL_NOEXCEPT
Snprintf-like formatting function that writes to a buffer.
fl::string format(const char *fmt)
Format with no arguments.
Base definition for an LED controller.