Phyduino Board Support
v0.1.1-rc.1
Physics
›
Electronic Support Services
›
Introduction to Electronics
›
Phyduino Board Support
›
API reference
Toggle main menu visibility
Loading...
Searching...
No Matches
SerialUSB.h
Go to the documentation of this file.
1
9
#pragma once
10
11
#include "api/HardwareSerial.h"
12
19
class
SerialUSBClass
:
public
arduino::HardwareSerial {
20
public
:
25
void
begin
(
unsigned
long
baud)
override
{ (void)baud; }
26
32
void
begin
(
unsigned
long
baud, uint16_t config)
override
{ (void)baud; (void)config; }
33
37
void
end
()
override
{}
38
43
int
available
()
override
;
44
49
int
peek
()
override
;
50
55
int
read
()
override
;
56
60
void
flush
()
override
;
61
67
size_t
write
(uint8_t c)
override
{
return
write
(&c, 1); }
68
78
size_t
write
(
const
uint8_t* buffer,
size_t
size)
override
;
79
using
arduino::Print::write;
80
87
operator
bool()
override
;
88
};
89
91
extern
SerialUSBClass
Serial
;
92
94
void
serialUsbInitStack
();
serialUsbInitStack
void serialUsbInitStack()
Starts TinyUSB and its 1 ms background task. Called once from init().
Serial
SerialUSBClass Serial
USB serial port, the one the Serial Monitor uses.
SerialUSBClass
Serial port over the board's USB connection; sketches use Serial.
Definition
SerialUSB.h:19
SerialUSBClass::end
void end() override
Does nothing: the port stays up so the IDE can still upload.
Definition
SerialUSB.h:37
SerialUSBClass::read
int read() override
Takes the next received byte from the buffer.
SerialUSBClass::write
size_t write(uint8_t c) override
Sends one byte.
Definition
SerialUSB.h:67
SerialUSBClass::begin
void begin(unsigned long baud) override
Does nothing: the port starts before setup().
Definition
SerialUSB.h:25
SerialUSBClass::begin
void begin(unsigned long baud, uint16_t config) override
Does nothing: the port starts before setup().
Definition
SerialUSB.h:32
SerialUSBClass::peek
int peek() override
Next received byte, left in the buffer.
SerialUSBClass::flush
void flush() override
Sends any bytes still held in the USB buffer.
SerialUSBClass::write
size_t write(const uint8_t *buffer, size_t size) override
Sends a block of bytes.
SerialUSBClass::available
int available() override
Number of received bytes waiting to be read.
platform
cores
phyduino
SerialUSB.h
Generated by
1.17.0