![]() |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
This library supports creating and managing one or more half duplex serial connections with peripheral devices. The pointer returned when a connection is opened can be used to identify the connection for other calls with serial parameter types in this library. The identifier can also be used to identify the serial connection for higher level formatted text transmit/receive functions with text_t parameter types in the simpletext library.
More...
#include "simpletext.h"
Include dependency graph for serial.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | serial_info |
| Defines serial interface structure of 9 contiguous int variables. More... | |
Macros | |
| #define | SERIAL_MIN_PIN 0 |
| Min serial pin value. | |
| #define | SERIAL_MAX_PIN 31 |
| Max serial pin value. | |
Typedefs | |
| typedef struct serial_info | Serial_t |
| Defines serial interface structure of 9 contiguous int variables. | |
| typedef text_t | serial |
| Makes declarations like serial lcd to stand in for text_t lcd. Spelling is choice of Parallax education, not the author. | |
Functions | |
| serial * | serial_open (int rxpin, int txpin, int mode, int baudrate) |
| Open a simple (half duplex) serial connection. More... | |
| void | serial_close (serial *device) |
| Close serial connection. More... | |
| int | serial_rxChar (serial *device) |
| Receive a byte. Waits until next byte is received. More... | |
| int | serial_txChar (serial *device, int txbyte) |
| Send a byte. More... | |
This library supports creating and managing one or more half duplex serial connections with peripheral devices. The pointer returned when a connection is opened can be used to identify the connection for other calls with serial parameter types in this library. The identifier can also be used to identify the serial connection for higher level formatted text transmit/receive functions with text_t parameter types in the simpletext library.
Definition in file serial.h.
| struct serial_info |
| void serial_close | ( | serial * | device | ) |
Close serial connection.
| *device | Identifier returned by serial_open. |
Definition at line 11 of file serial_close.c.
| serial* serial_open | ( | int | rxpin, |
| int | txpin, | ||
| int | mode, | ||
| int | baudrate | ||
| ) |
Open a simple (half duplex) serial connection.
| rxpin | Serial input pin, receives serial data. |
| txpin | Serial output pin, transmits serial data. |
| mode | Unused mode field (for FdSerial compatibility) |
| baudrate | Bit value transmit rate, 9600, 115200, etc... |
Definition at line 14 of file serial_open.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int serial_rxChar | ( | serial * | device | ) |
Receive a byte. Waits until next byte is received.
| *device | Identifier returned by serial_open. |
Definition at line 40 of file serial_rxtx.c.
Here is the caller graph for this function:| int serial_txChar | ( | serial * | device, |
| int | txbyte | ||
| ) |
Send a byte.
| *device | is a previously open/started serial device. |
| txbyte | The byte to send. |
Definition at line 81 of file serial_rxtx.c.
Here is the caller graph for this function:
1.8.17