diff --git a/wiringPi/wiringSerial.c b/wiringPi/wiringSerial.c index ca976a9..cdc4dd1 100644 --- a/wiringPi/wiringSerial.c +++ b/wiringPi/wiringSerial.c @@ -159,6 +159,17 @@ void serialPuts (const int fd, const char *s) } /* + * serialPuts: + * Send binarys to serial port + ********************************************************************************* + */ + +void serialPutBin (const int fd, const char *bin, unsigned int size) +{ + write (fd, bin, size) ; +} + +/* * serialPrintf: * Printf over Serial ********************************************************************************* diff --git a/wiringPi/wiringSerial.h b/wiringPi/wiringSerial.h index 430dc73..63514c5 100644 --- a/wiringPi/wiringSerial.h +++ b/wiringPi/wiringSerial.h @@ -29,6 +29,7 @@ extern void serialClose (const int fd) ; extern void serialFlush (const int fd) ; extern void serialPutchar (const int fd, const unsigned char c) ; extern void serialPuts (const int fd, const char *s) ; +extern void serialPutBin (const int fd, const char *bin, unsigned int size) ; extern void serialPrintf (const int fd, const char *message, ...) ; extern int serialDataAvail (const int fd) ; extern int serialGetchar (const int fd) ;