#include "buses.h"
Defines | |
#define | UDP1_RXBUF_OVERRUN 0x01 |
#define | UDP1_TXBUF_OVERRUN 0x10 |
#define | udp1BusIsGetReady() busRxBufHasData(BUSID_UDP1) |
#define | udp1BusRxBufEmpty() busIsRxBufEmpty(BUSID_UDP1) |
#define | UDP2_RXBUF_OVERRUN 0x01 |
#define | UDP2_TXBUF_OVERRUN 0x10 |
#define | udp2BusIsGetReady() busRxBufHasData(BUSID_UDP2) |
#define | udp2BusRxBufEmpty() busIsRxBufEmpty(BUSID_UDP2) |
Functions | |
void | serPut2Bytes (BYTE b1, BYTE b2) |
void | serPutByteHex (BYTE c) |
void | serPutDebugMsgRomStr (BYTE debugCode, BYTE msgCode, ROM char *msgString) |
void | serPutRomString (ROM char *str) |
void | serPutRomStringAndNull (ROM char *str) |
void | serPutString (BYTE *s) |
void | serPutStringAndNull (BYTE *str) |
BYTE | udp1BusGetByte (void) |
BYTE | udp1BusGetStat (void) |
void | udp1BusPutByte (BYTE c) |
BYTE | udp2BusGetByte (void) |
BYTE | udp2BusGetStat (void) |
void | udpBusInit (void) |
void | udpBusService (void) |
//********************************************************************* //-------------- BusUDP Configuration -------------------- //********************************************************************* //The default UDP port to use for the UDP 1 Port. //#define BUS_UDP1_PORT (54125) // //The default UDP port to use for the UDP 2 Port. //#define BUS_UDP2_PORT (54126)
#define UDP1_RXBUF_OVERRUN 0x01 |
#define UDP1_TXBUF_OVERRUN 0x10 |
#define udp1BusIsGetReady | ( | ) | busRxBufHasData(BUSID_UDP1) |
Are there any bytes in the UDP1 Bus receive buffer.
#define udp1BusRxBufEmpty | ( | ) | busIsRxBufEmpty(BUSID_UDP1) |
Are there any bytes in the receive buffer.
#define UDP2_RXBUF_OVERRUN 0x01 |
#define UDP2_TXBUF_OVERRUN 0x10 |
#define udp2BusIsGetReady | ( | ) | busRxBufHasData(BUSID_UDP2) |
Are there any bytes in the UDP1 Bus receive buffer.
#define udp2BusRxBufEmpty | ( | ) | busIsRxBufEmpty(BUSID_UDP2) |
Are there any bytes in the receive buffer.
Sent the given two bytes via the USART.
b1 | The first byte to be sent. | |
b2 | The second byte to be sent. |
void serPutByteHex | ( | 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 |
Sent the given debug message to the USART. The following is sent: [debugCode][msgCode][msgString]
debugCode | The Debug Message's "Debug Code". This will be the first byte sent. | |
msgCode | The Debug Message's "Message Code". This will be the second byte sent. | |
msgString | The Debug Message's "Message String", has to be a NULL terminated string. This will be sent after the msgCode. |
void serPutRomString | ( | 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 serPutRomStringAndNull | ( | ROM char * | str | ) |
Transmit a NULL terminated string. It is added to the transmit buffer, and asynchronously transmitted. The NULL is ALSO sent!
str | Null terminated string to write out on the serial port |
void serPutString | ( | 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 serPutStringAndNull | ( | BYTE * | str | ) |
Transmit a NULL terminated string. It is added to the transmit buffer, and asynchronously transmitted. The NULL is ALSO sent!
str | Null terminated string to write out on the serial port |
BYTE udp1BusGetByte | ( | void | ) |
Get the next byte in the RX buffer. Before calling this function, the udp1IsGetReady() function should be called to check if there is any data available.
BYTE udp1BusGetStat | ( | void | ) |
Get the current status of the UDP 1 Port
void udp1BusPutByte | ( | BYTE | c | ) |
Add a byte to the TX buffer.
c | Byte to write out on the serial port |
BYTE udp2BusGetByte | ( | void | ) |
Get the next byte in the RX buffer. Before calling this function, the udp1IsGetReady() function should be called to check if there is any data available.
BYTE udp2BusGetStat | ( | void | ) |
Get the current status of the UDP 2 Port
void udpBusInit | ( | void | ) |
Initialize this module
void udpBusService | ( | void | ) |
Service this module