Welcome to the EyeBot
Version 7 - RPi1
A Controller For Various Hardware IO
|
Defines functions to communicate via serial. More...
Functions | |
int | SERGetPaths () |
Obtains the system paths to the serial usb devices matching description in hdt.txt. More... | |
int | set_interface_attribs (int fd, int speed, int parity, int handshake) |
sets the attributes for the port More... | |
void | set_blocking (int fd, int should_block) |
Sets the blocking flags for the serial port. More... | |
int | SERInit (int interface, int baud, int handshake) |
Initialises the port. More... | |
int | SERSendChar (int interface, char ch) |
Sends a single character to the given port handle. More... | |
int | SERSend (int interface, char *buf) |
Sends a string to the given port handle. More... | |
int | SERReceive (int interface, char *buf) |
Receives a string from port handle. More... | |
char | SERReceiveChar (int interface) |
Receives a single character from the given port handle. More... | |
bool | SERCheck (int interface) |
checks and flushes the port by sending enter until seeing prompt More... | |
int | SERFlush (int interface) |
flushes the port More... | |
int | SERClose (int interface) |
closes the port More... | |
Defines functions to communicate via serial.
bool SERCheck | ( | int | interface | ) |
checks and flushes the port by sending enter until seeing prompt
interface | the inteface type |
int SERClose | ( | int | interface | ) |
closes the port
interface | the inteface type |
int SERFlush | ( | int | interface | ) |
flushes the port
interface | the inteface type |
int SERGetPaths | ( | ) |
Obtains the system paths to the serial usb devices matching description in hdt.txt.
int SERInit | ( | int | interface, |
int | baud, | ||
int | handshake | ||
) |
Initialises the port.
interface | the inteface type |
baud | the baud rate |
handshake | the handshake type |
int SERReceive | ( | int | interface, |
char * | buf | ||
) |
Receives a string from port handle.
interface | the inteface type |
buf | the string to store the received bytes |
size | the length of the string to receive |
char SERReceiveChar | ( | int | interface | ) |
Receives a single character from the given port handle.
interface | the inteface type |
int SERSend | ( | int | interface, |
char * | buf | ||
) |
Sends a string to the given port handle.
interface | the inteface type |
buf | the string to send |
size | the length of the string to send |
int SERSendChar | ( | int | interface, |
char | ch | ||
) |
Sends a single character to the given port handle.
interface | the inteface type |
ch | the character to send |
void set_blocking | ( | int | fd, |
int | should_block | ||
) |
Sets the blocking flags for the serial port.
fd | the port handle |
should_block | an boolean whether to block port or not |
int set_interface_attribs | ( | int | fd, |
int | speed, | ||
int | parity, | ||
int | handshake | ||
) |
sets the attributes for the port
fd | the port handle |
speed | the baud rate |
parity | the parity of the port |
handshake | the handshake type |