Standard I/O (stdio) management component that implements a stdio USB CDC interface on AVR devices.
Modules | |
Related Project(s) | |
In this section you can find all the projects related to the USB/CDC Standard I/O (stdio). | |
Quick Start Guide(s) | |
In this section you can find a list of all Quick Start guides related to the USB/CDC Standard I/O (stdio). | |
Functions | |
int | _read (int *f) |
int | _write (char c, int *f) |
void | stdio_usb_disable (void) |
Disables the stdio in USB Serial Mode. More... | |
bool | stdio_usb_enable (void) |
Enables the stdio in USB Serial Mode. More... | |
void | stdio_usb_getchar (void volatile *usart, char *data) |
Waits until a character is received, and returns it. More... | |
void | stdio_usb_init (void) |
Initializes the stdio in USB Serial Mode. More... | |
int | stdio_usb_putchar (volatile void *usart, char data) |
Sends a character with the USART. More... | |
Variables | |
void(* | ptr_get )(void volatile *, char *) |
Pointer to the external low level read function. More... | |
int(* | ptr_put )(void volatile *, char) |
Pointer to the external low level write function. More... | |
volatile void *volatile | stdio_base |
Pointer to the base of the USART module instance to use for stdio. More... | |
int _read | ( | int * | f | ) |
Referenced by stdio_usb_init().
int _write | ( | char | c, |
int * | f | ||
) |
Referenced by stdio_usb_init().
void stdio_usb_disable | ( | void | ) |
bool stdio_usb_enable | ( | void | ) |
Enables the stdio in USB Serial Mode.
1
if function was successfully done, otherwise 0
. References stdio_usb_interface_enable.
void stdio_usb_getchar | ( | void volatile * | usart, |
char * | data | ||
) |
Waits until a character is received, and returns it.
usart | Base address of the USART instance. |
data | Data to read |
References stdio_usb_interface_enable, and udi_cdc_getc().
Referenced by stdio_usb_init().
void stdio_usb_init | ( | void | ) |
Initializes the stdio in USB Serial Mode.
References _read(), _write(), NULL, ptr_get, ptr_put, stdio_base, stdio_usb_getchar(), stdio_usb_putchar(), and udc_start().
int stdio_usb_putchar | ( | volatile void * | usart, |
char | data | ||
) |
Sends a character with the USART.
usart | Base address of the USART instance. |
data | Character to write. |
0 | The character was written. |
-1 | The function timed out before the transmitter became ready. |
References stdio_usb_interface_enable, and udi_cdc_putc().
Referenced by stdio_usb_init().
void(* ptr_get)(void volatile *, char *) |
Pointer to the external low level read function.
Referenced by _read(), and stdio_usb_init().
int(* ptr_put)(void volatile *, char) |
Pointer to the external low level write function.
Referenced by _write(), and stdio_usb_init().
volatile void* volatile stdio_base |
Pointer to the base of the USART module instance to use for stdio.
Referenced by _read(), _write(), and stdio_usb_init().