9 #define SERIALDEFAULTDEVICE "/dev/ttyS0" 36 if(!strncasecmp(buf,
"none", 4))
38 else if(!strncasecmp(buf,
"no", 2))
40 else if(!strncasecmp(buf,
"odd", 3))
42 else if(!strncasecmp(buf,
"even", 4))
44 else if(*buf ==
'N' || *buf ==
'n')
46 else if(*buf ==
'O' || *buf ==
'o')
48 else if(*buf ==
'E' || *buf ==
'e')
50 if(ressize) *ressize = r;
72 else if(*buf ==
'r' || *buf ==
'R' || *buf ==
'c' || *buf ==
'C')
77 if(ressize) *ressize = r;
90 __attribute__((__unused__))
int SerialRead(struct serial *sn, char *buffer, size_t size)
static enum SerialProtocol SerialGetProtocol(const char *buf, int *ressize)
const char * SerialInit(struct serial *sn, const char *Device, enum SerialBaud Baud, enum SerialStopbits StopBits, enum SerialProtocol Protocol, enum SerialParity Parity, enum SerialDatabits DataBits, int dowrite)
void SerialFree(struct serial *sn)
int SerialWrite(struct serial *sn, const char *buffer, size_t size)
static enum SerialParity SerialGetParity(const char *buf, int *ressize)