*********************************************************************************
*/
-int serialOpen (char *device, int baud)
+int serialOpen (const char *device, const int baud)
{
struct termios options ;
speed_t myBaud ;
case 1200: myBaud = B1200 ; break ;
case 1800: myBaud = B1800 ; break ;
case 2400: myBaud = B2400 ; break ;
+ case 4800: myBaud = B4800 ; break ;
case 9600: myBaud = B9600 ; break ;
case 19200: myBaud = B19200 ; break ;
case 38400: myBaud = B38400 ; break ;
*********************************************************************************
*/
-void serialFlush (int fd)
+void serialFlush (const int fd)
{
tcflush (fd, TCIOFLUSH) ;
}
*********************************************************************************
*/
-void serialClose (int fd)
+void serialClose (const int fd)
{
close (fd) ;
}
*********************************************************************************
*/
-void serialPutchar (int fd, unsigned char c)
+void serialPutchar (const int fd, const unsigned char c)
{
write (fd, &c, 1) ;
}
*********************************************************************************
*/
-void serialPuts (int fd, char *s)
+void serialPuts (const int fd, const char *s)
{
write (fd, s, strlen (s)) ;
}
*********************************************************************************
*/
-void serialPrintf (int fd, char *message, ...)
+void serialPrintf (const int fd, const char *message, ...)
{
va_list argp ;
char buffer [1024] ;
*********************************************************************************
*/
-int serialDataAvail (int fd)
+int serialDataAvail (const int fd)
{
int result ;
*********************************************************************************
*/
-int serialGetchar (int fd)
+int serialGetchar (const int fd)
{
uint8_t x ;