Reformat source
This commit is contained in:
parent
15fe1a928a
commit
5df7c881b9
6 changed files with 733 additions and 649 deletions
13
serial_io.h
13
serial_io.h
|
|
@ -29,12 +29,13 @@ int serialport_init(const char* device, int baud = BAUDRATE, bool block = false)
|
|||
#ifdef __cplusplus
|
||||
class serialIoException: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
int fd;
|
||||
int errorNumber;
|
||||
serialIoException(int fd_, int errorNumber_):
|
||||
std::runtime_error("file descriptor error, fd: " + std::to_string(fd_) + " error: " + strerror(errorNumber_) + "\n"), fd(fd_), errorNumber(errorNumber_)
|
||||
{}
|
||||
public:
|
||||
int fd;
|
||||
int errorNumber;
|
||||
serialIoException(int fd_, int errorNumber_):
|
||||
std::runtime_error("file descriptor error, fd: " + std::to_string(fd_) + " error: " + strerror(errorNumber_) + "\n"),
|
||||
fd(fd_), errorNumber(errorNumber_)
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue