hollyhock
|
Functions used for sending and receiving serial data. More...
#include <stdint.h>
Go to the source code of this file.
Functions | |
int | Serial_Open (unsigned char *mode) |
int | Serial_IsOpen (void) |
int | Serial_Close (int mode) |
int | Serial_Read (unsigned char *out, int sz, short *count) |
int | Serial_ReadSingle (unsigned char *out) |
int | Serial_Peek (int idx, unsigned char *out) |
int | Serial_PollRX (void) |
int | Serial_ClearRX (void) |
int | Serial_Write (const unsigned char *buf, int count) |
int | Serial_WriteSingle (unsigned char x) |
int | Serial_WriteUnbuffered (unsigned char x) |
int | Serial_PollTX (void) |
int | Serial_ClearTX (void) |
Functions used for sending and receiving serial data.
int Serial_Open | ( | unsigned char * | mode | ) |
Opens the 3-pin serial port with the specified parameters. see https://prizm.cemetech.net/index.php?title=Serial_Open for more info. mode: 0 always 0 1 bit rate 0=300, 5=9600, 9=115200 2 parity 0=none, 1=odd, 2=even 3 data length 0=8bit, 1=7bit 4 stop bits 0=1bit, 1=2bit 5 always 0 Returns: 0 success 3 already open
mode | The mode of the serial port. |
int Serial_Write | ( | const unsigned char * | buf, |
int | count | ||
) |
Sends a number of bytes through the 3-pin serial port, by putting them in the transmit buffer. see https://prizm.cemetech.net/index.php?title=Serial_Write
buf | pointer to buffer containing the bytes to transmit @count amount of bytes to transmit from buf |