Go to the source code of this file.
◆ HOST_BAUD
◆ HOST_UBRR
◆ UART0_TXBUFSIZE
| #define UART0_TXBUFSIZE 10 |
Size of the UART0 transmit buffer.
◆ CMDLINE_MAX
◆ InitUart()
Initialize USART Hardware and Pointers.
2 Stop-bits are used, USART0 connects to the Host at 9600 baud, 8 bits and no parity.
◆ putchar_uart0()
| int putchar_uart0 |
( |
char |
c, |
|
|
FILE * |
stream |
|
) |
| |
The Putchar-Routine for USART0 (Host-Interface)
- Note
- This routine blocks when the transmit buffer is full.
- Parameters
-
| c | The Character |
| stream | A Pointer to the File (unused) |
- Returns
- Always 0
◆ hprintf_P()
| int hprintf_P |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
printf_P for Communication with the Host
- Parameters
-
| fmt | Format String |
| ... | Additional Parameters |
- Returns
- The return value of the underlying vfprintf_P
◆ Usart0FlushRx()
| void Usart0FlushRx |
( |
void |
| ) |
|
◆ UsartTimerCallback()
| static void UsartTimerCallback |
( |
void |
| ) |
|
|
inlinestatic |
Timer Callback. Checks for CTS from the Host to resume Communication.
This function re-enables interrupts after CTS becomes true again and must be called periodically e.g. from timer interrupt.
◆ AssertRTS()
| static void AssertRTS |
( |
void |
| ) |
|
|
inlinestatic |
Asserts RTS to the Host Line, i.e. allows the Host to send Data.
◆ ReleaseRTS()
| static void ReleaseRTS |
( |
void |
| ) |
|
|
inlinestatic |
Releases RTS to the Host Line, i.e. stops the Host from sending Data.
◆ cmdline
Ready to hold CMDLINE_MAX chars plus terminating 0.
◆ cFlags
◆ CFLAG_PARITYERROR
| const uint8_t CFLAG_PARITYERROR =4 |
|
static |
Parity Error in received Byte.
◆ CFLAG_CHECKSUMERROR
| const uint8_t CFLAG_CHECKSUMERROR =8 |
|
static |
Checksum Error in received Telegram.
◆ CFLAG_CMDRECEIVED
| const uint8_t CFLAG_CMDRECEIVED =16 |
|
static |
Received the terminating CR of a Command.
◆ CFLAG_BYTERECEIVED
| const uint8_t CFLAG_BYTERECEIVED =32 |
|
static |
Received a Byte from the host.
◆ tbuf0_tail
| volatile uint8_t tbuf0_tail |
◆ tbuf0_head
| volatile uint8_t tbuf0_head |
◆ byteFromHost
| volatile uint8_t byteFromHost |
Contains the last byte received from the host.
◆ hostCommandsLost
| volatile uint8_t hostCommandsLost |
Counts the number of commands lost due to buffer overrun.
◆ uart0