simpletext library
v0.8
Compact variations of put/get write/read and print/scan for smaller program sizes
|
#include "simpletext.h"
Go to the source code of this file.
Data Structures | |
struct | serial_info |
Typedefs | |
typedef struct serial_info | Serial_t |
typedef text_t | serial |
Functions | |
serial * | serial_open (int rxpin, int txpin, int mode, int baudrate) |
void | serial_close (serial *device) |
int | serial_rxChar (serial *device) |
int | serial_txChar (serial *device, int txbyte) |
Defines serial module
Copyright (c) 2013, Parallax Inc. Written by Steve Denson Symbol naming decided by Parallax
void serial_close | ( | serial * | device | ) |
Close device. Equivalent to a stop function without stopping a cog.
device | is a previously open/started terminal device. |
serial* serial_open | ( | int | rxpin, |
int | txpin, | ||
int | mode, | ||
int | baudrate | ||
) |
Initializes the simple serial terminal. Equivalent to a start function which runs assembly in a cog.
rxpin | is pin number for receive input |
txpin | is pin number for transmit output |
mode | is unused mode field (for FdSerial compatibility) |
baudrate | is frequency of bits ... 115200, 57600, etc... |
int serial_rxChar | ( | serial * | device | ) |
Gets a byte from the receive queue if available. Function does not block.
device | is a previously open/started terminal device. |
int serial_txChar | ( | serial * | device, |
int | txbyte | ||
) |
Sends a byte on the transmit queue.
device | is a previously open/started terminal device. |
txbyte | is byte to send. |