|
hollyhock
|
Functions used for sending and receiving serial data. More...

Go to the source code of this file.
Macros | |
| #define | ro(...) |
| #define | rw(...) |
| #define | wo(...) |
Functions | |
| struct | __attribute__ ((packed)) Serial_Settings |
Variables | |
| enum Comm_Status(* | Serial_Open )(const struct Serial_Settings *mode) ro(1) |
| enum Comm_Status(* | Serial_IsOpen )(void) |
| enum Comm_Status(* | Serial_Close )(bool abortPending) |
| enum Comm_Status(* | Serial_Read )(void *out, uint16_t sz, uint16_t *count) wo(1) wo(3) |
| enum Comm_Status(* | Serial_ReadSingle )(void *out) wo(1) |
| enum Comm_Status(* | Serial_Peek )(uint16_t idx, void *out) wo(2) |
| uint16_t(* | Serial_PollRX )(void) |
| enum Comm_Status(* | Serial_ClearRX )(void) |
| enum Comm_Status(* | Serial_Write )(const void *buf, uint16_t count) ro(1) |
| enum Comm_Status(* | Serial_WriteSingle )(uint8_t x) |
| enum Comm_Status(* | Serial_WriteUnbuffered )(uint8_t x) |
| uint16_t(* | Serial_PollTX )(void) |
| enum Comm_Status(* | Serial_ClearTX )(void) |
Functions used for sending and receiving serial data.
| #define ro | ( | ... | ) |
| #define rw | ( | ... | ) |
| #define wo | ( | ... | ) |
|
extern |
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
| mode | The mode of the serial port. |
|
extern |
|
extern |
|
extern |
Reads up to sz bytes into out and writes the number received to count.
|
extern |
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 |