MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / Serial

Class Serial

src/utils/inc/serial.h:19–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17class Board;
18
19class Serial
20{
21public:
22 static Serial *create (const char *port_name, Board *board = nullptr);
23
24 virtual ~Serial ()
25 {
26 }
27 virtual int open_serial_port () = 0;
28 virtual bool is_port_open () = 0;
29 // timeout_only indicates to configure only the timeout, not the baud and line properties
30 virtual int set_serial_port_settings (int ms_timeout = 1000, bool timeout_only = false) = 0;
31 virtual int set_custom_baudrate (int baudrate) = 0;
32 virtual int set_custom_latency (int latency = 1) = 0;
33 virtual int flush_buffer () = 0;
34 virtual int read_from_serial_port (void *bytes_to_read, int size) = 0;
35 virtual int send_to_serial_port (const void *message, int length) = 0;
36 virtual int close_serial_port () = 0;
37 virtual const char *get_port_name () = 0;
38};

Callers 3

test_serialFunction · 0.90
test_serialFunction · 0.90
test_serialFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_serialFunction · 0.72
test_serialFunction · 0.72
test_serialFunction · 0.72