Go to the source code of this file.
Detailed Description
Definition in file mcp2200_uart.h.
Define Documentation
#define DIVIDER ((int)(_XTAL_FREQ/(16UL * MCP2200_BAUD) -1)) |
- Parameters:
-
DIVIDER | calculates value for SPRG |
Definition at line 14 of file mcp2200_uart.h.
- Parameters:
-
HIGH_SPEED | whether or not to include UART hi-speed |
Definition at line 16 of file mcp2200_uart.h.
#define MCP2200_BAUD 9600 |
- Parameters:
-
MCP2200_BAUD | UART hardware speed. Both sides must agree on this to work properly |
Definition at line 12 of file mcp2200_uart.h.
#define MCP2200_RX UART_RX |
#define MCP2200_RX_TRIS UART_TRIS_RX |
- Parameters:
-
MCP2200_RX_TRIS | the RX pin |
Definition at line 22 of file mcp2200_uart.h.
#define MCP2200_TX UART_TX |
#define MCP2200_TX_TRIS UART_TRIS_TX |
- Parameters:
-
MCP2200_TX_TRIS | the RX pin |
Definition at line 24 of file mcp2200_uart.h.
Function Documentation
uint8_t mcp2200_getch |
( |
void |
| ) |
|
Receive one character from MCP2200
- Returns:
- unsigned char RCREG
Definition at line 73 of file mcp2200_uart.c.
uint8_t mcp2200_getche |
( |
void |
| ) |
|
A simple 'echo back what was sent'
- Returns:
- unsigned char character sent
Definition at line 85 of file mcp2200_uart.c.
void mcp2200_init |
( |
void |
| ) |
|
Configures the UART module for 9600 baud.
- Note:
- If this is changed, you must change it in the GUI as well
Definition at line 21 of file mcp2200_uart.c.
void mcp2200_prompt |
( |
void |
| ) |
|
Outputs a message to prompt the user for a keypress through COM port
Definition at line 39 of file mcp2200_uart.c.
void putch |
( |
uint8_t |
byte | ) |
|
Prints a single character If using PRINTF, this MUST be avaliable!
- Parameters:
-
Definition at line 61 of file mcp2200_uart.c.