You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
396 B
16 lines
396 B
#pragma once |
|
|
|
#include <stdint.h> |
|
#include <stdlib.h> |
|
|
|
class SerialDevice { |
|
public: |
|
virtual ~SerialDevice() {} |
|
|
|
virtual bool open() = 0; |
|
virtual bool close() = 0; |
|
virtual ssize_t write(const uint8_t *buf, uint16_t n) = 0; |
|
virtual ssize_t read(uint8_t *buf, uint16_t n) = 0; |
|
virtual void set_blocking(bool blocking) = 0; |
|
virtual void set_speed(uint32_t speed) = 0; |
|
};
|
|
|