#include "buses.h"
Defines | |
| #define | ser2IsGetReady() busRxBufHasData(BUSID_SER2) |
| #define | ser2RxBufEmpty() busIsRxBufEmpty(BUSID_SER2) |
Functions | |
| void | ser2Disable (void) |
| void | ser2Enable (void) |
| BYTE | ser2GetByte (void) |
| void | ser2Init (void) |
| void | ser2PutByte (BYTE c) |
| void | ser2PutByteHex (BYTE c) |
| void | ser2PutRomString (ROM char *str) |
| void | ser2PutString (BYTE *s) |
| void | ser2Reset (void) |
| void | ser2RxIsr (void) |
| void | ser2Service (void) |
| void | ser2TxIsr (void) |
//********************************************************************* //-------------- busser2 Configuration -------------------- //********************************************************************* //Comment this line if the transmit routines should NOT wait for the bytes to be send via //USART if tx buffer is full #define SER_WAIT_FOR_TXBUF //Uncomment this line if the application does NOT configure the USART //#define BAUD_RATE 9600ul
| #define ser2IsGetReady | ( | ) | busRxBufHasData(BUSID_SER2) |
Are there any bytes in the receive buffer.
| #define ser2RxBufEmpty | ( | ) | busIsRxBufEmpty(BUSID_SER2) |
Are there any bytes in the receive buffer.
| void ser2Disable | ( | void | ) |
Disables the serial port
| void ser2Enable | ( | void | ) |
Enables the serial port AND . Can only be called after ser2Init() has been called.
| BYTE ser2GetByte | ( | void | ) |
Get the next byte in the RX buffer. Before calling this function, the ser2IsGetReady() function should be called to check if there is any data available on the serial port.
| void ser2Init | ( | void | ) |
Initialize this module
| void ser2PutByte | ( | BYTE | c | ) |
Send the given byte to the USART. It is added to the transmit buffer, and asynchronously transmitted.
| c | Byte to write out on the serial port |
| void ser2PutByteHex | ( | BYTE | c | ) |
Send the ASCII hex value of the given byte to the USART. It is added to the transmit buffer, and asynchronously transmitted. For example, if c=11, then "0B" will be sent to the USART
| c | Byte to write out on the serial port |
| void ser2PutRomString | ( | ROM char * | str | ) |
Transmit a NULL terminated string. It is added to the transmit buffer, and asynchronously transmitted. The NULL is NOT sent!
| str | Null terminated string to write out on the serial port |
| void ser2PutString | ( | BYTE * | s | ) |
Transmit a NULL terminated string. It is added to the transmit buffer, and asynchronously transmitted. The NULL is NOT sent!
| s | Null terminated string to write out on the serial port |
| void ser2Reset | ( | void | ) |
Resets this module, and empties all buffers.
| void ser2RxIsr | ( | void | ) |
Called in the USART RX ISR
| void ser2Service | ( | void | ) |
Service this module
| void ser2TxIsr | ( | void | ) |
Called in the USART TX ISR
1.5.8