add broadcast support

This commit is contained in:
IMback
2018-02-05 20:22:37 +01:00
parent 7edc2108a7
commit 6b18e5ee70
2 changed files with 21 additions and 12 deletions

View File

@ -5,13 +5,12 @@ struct termios toptions;
void sWrite(int port, char string[], size_t length)
{
if(port != -1) write(port, string, length);
else for( size_t j = 0; j < length; j++ )std::cout<<string[j];
}
void sWrite(int port, const char string[], size_t length)
{
if(port != -1) write(port, string, length);
else for( size_t j = 0; j < length; j++ )std::cout<<string[j];
}
ssize_t sRead(int port, void *buf, size_t count)