|
Electronic Load
1.0
Programmable Constant Current Sink
|
Routines for serial Communication. More...

Functions | |
| void | CopyRbuf0ToCmdline (void) |
| int | hprintf_P (const char *fmt,...) |
| printf_P for Communication with the Host More... | |
| void | InitUart () |
| Initialize USART Hardware and Pointers. More... | |
| ISR (USART0_UDRE_vect) | |
| USART0 (Host-Interface) Data Register empty Interrupt. More... | |
| ISR (USART0_RX_vect) | |
| USART0 Receive-Interrupt (Host-Interface) More... | |
| int | putc0 (char c) |
| Puts a char to USART0 (Host-Interface) More... | |
| int | putchar_uart0 (char c, FILE *stream) |
| The Putchar-Routine for USART0 (Host-Interface) More... | |
| void | Usart0FlushRx (void) |
Variables | |
| volatile uint8_t | byteFromHost |
| Contains the last byte received from the host. More... | |
| volatile uint8_t | cFlags |
| volatile char | cmdline [CMDLINE_MAX+1] |
| Ready to hold CMDLINE_MAX chars plus terminating 0. More... | |
| volatile uint8_t | hostCommandsLost |
| Counts the number of commands lost due to buffer overrun. More... | |
| static volatile char | rbuf0 [CMDLINE_MAX+1] |
| Receive Buffer for UART0. More... | |
| static volatile uint8_t | rbuf0_ptr |
| static volatile char | tbuf0 [UART0_TXBUFSIZE] |
| Transmit Buffer for UART0. More... | |
| volatile uint8_t | tbuf0_head |
| volatile uint8_t | tbuf0_tail |
| FILE | uart0 =FDEV_SETUP_STREAM(putchar_uart0,NULL,_FDEV_SETUP_WRITE) |
Routines for serial Communication.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
| void InitUart | ( | void | ) |
Initialize USART Hardware and Pointers.
2 Stop-bits are used, USART0 connects to the Host at 9600 baud, 8 bits and no parity.

| int putc0 | ( | char | c | ) |
Puts a char to USART0 (Host-Interface)
| c | The Character |

| int putchar_uart0 | ( | char | c, |
| FILE * | stream | ||
| ) |
The Putchar-Routine for USART0 (Host-Interface)
| c | The Character |
| stream | A Pointer to the File (unused) |

| ISR | ( | USART0_UDRE_vect | ) |
USART0 (Host-Interface) Data Register empty Interrupt.
| void CopyRbuf0ToCmdline | ( | void | ) |

| ISR | ( | USART0_RX_vect | ) |
USART0 Receive-Interrupt (Host-Interface)
This routine collects incoming characters until a complete host- or Bluetooth-command has been received.

| void Usart0FlushRx | ( | void | ) |
| int hprintf_P | ( | const char * | fmt, |
| ... | |||
| ) |
printf_P for Communication with the Host
| fmt | Format String |
| ... | Additional Parameters |
| volatile uint8_t cFlags |
|
static |
Transmit Buffer for UART0.
|
static |
Receive Buffer for UART0.
| volatile uint8_t tbuf0_tail |
| volatile uint8_t tbuf0_head |
|
static |
| volatile uint8_t byteFromHost |
Contains the last byte received from the host.
| volatile uint8_t hostCommandsLost |
Counts the number of commands lost due to buffer overrun.
| volatile char cmdline[CMDLINE_MAX+1] |
Ready to hold CMDLINE_MAX chars plus terminating 0.
| FILE uart0 =FDEV_SETUP_STREAM(putchar_uart0,NULL,_FDEV_SETUP_WRITE) |
1.8.15