|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
22 extern int binary_pst_dat_start[];
35 if(rxpin == 31 && txpin == 30) {
59 if(rxpin == 31 && txpin == 30)
78 fdptr->rx_pin = rxpin;
79 fdptr->tx_pin = txpin;
83 fdptr->ticks =
CLKFREQ/baudrate;
85 fdptr->buffptr = bufptr;
89 fdptr->tx_pin = fdptr->rx_pin;
100 #if defined(__PROPELLER_USE_XMM__)
101 {
unsigned int buffer[2048];
102 memcpy(buffer, binary_pst_dat_start, 2048);
106 term->
cogid[0] = setStopCOGID(
cognew((
void*)binary_pst_dat_start, (
void*)fdptr));
117 int id = term->
cogid[0];
124 if(
id > 0)
cogstop(getStopCOGID(
id));
150 volatile char* rxbuf = (
volatile char*) fdp->
buffptr;
#define FDSERIAL_BUFF_MASK
#define FDSERIAL_MODE_IGNORE_TX_ECHO
int(* rxChar)(struct text_struct *p)
#define FDSERIAL_MODE_OPENDRAIN_TX
int(* txChar)(struct text_struct *p, int ch)
#define cognew(code, param)
Start a new Propeller PASM COG.
int fdserial_rxCheck(fdserial *term)
Gets a byte from the receive buffer if available, but does not wait if there's nothing in the buffer.
fdserial * fdserial_open(int rxpin, int txpin, int mode, int baudrate)
Open a full duplex serial connection.
void fdserial_close(fdserial *term)
Stop stops the cog running the native assembly driver.
void simpleterm_close(void)
Closes the SimpleIDE Terminal connection in one cog so that it can be opened in another cog with simp...
#define CLKFREQ
Returns the current clock frequency.
Defines fdserial interface structure of 9 contiguous longs + buffers.
void fdserial_txFlush(fdserial *term)
Remove any bytes that might be waiting in the transmit buffer.
Structure that contains data used by simple text device libraries.
int fdserial_txChar(fdserial *term, int txbyte)
Send a byte by adding it to the transmit buffer.
#define waitcnt(a)
Wait until system counter reaches a value.
#define cogstop(a)
Stop a COG.
#define CNT
The system clock count.
volatile int terminalEcho
#define FDSERIAL_MODE_RX_ONLY
int fdserial_txEmpty(fdserial *term)
Check if the transmit buffer is empty.
int fdserial_rxChar(fdserial *term)
Get a byte from the receive buffer, or if it's emtpy, wait until a byte is received.
This library supports creating and managing one or more full duplex serial connections with periphera...