|
LUFA Library - Virtual Serial Device Demo
|
Data Structures | |
| struct | couleur |
Macros | |
| #define | LED_BIT 0 |
| #define | BUT_BIT 0 |
| #define | MAX_BUFFER 64 |
| #define | NB_COLORS 4 |
| #define | MAX_COLOR_INTENSITY 4095 |
| #define | MAX_COLORS 5 |
Functions | |
| char * | random_series (int n, couleur *bank) |
| int | equals (couleur c1, couleur c2) |
| int | contains (couleur c1, couleur *series, size_t length) |
| int | main (void) |
| void | SetupHardware (void) |
| void | EVENT_USB_Device_Connect (void) |
| void | EVENT_USB_Device_Disconnect (void) |
| void | EVENT_USB_Device_ConfigurationChanged (void) |
| void | EVENT_USB_Device_ControlRequest (void) |
| void | CDC_Task (void) |
Variables | |
| const char * | CORRECT = "good" |
| const char * | MISS = "miss" |
| const char * | WRONG = "wrong" |
| int | cpt = 0 |
| char | history [6] = "" |
| char * | serie |
| static CDC_LineEncoding_t | LineEncoding |
Main source file for the VirtualSerial demo. This file contains the main tasks of the demo and is responsible for the initial application hardware configuration.
| #define BUT_BIT 0 |
| #define LED_BIT 0 |
| #define MAX_BUFFER 64 |
| #define MAX_COLOR_INTENSITY 4095 |
| #define MAX_COLORS 5 |
| #define NB_COLORS 4 |
| void CDC_Task | ( | void | ) |
Function to manage CDC data transmission and reception to and from the host.
| void EVENT_USB_Device_ConfigurationChanged | ( | void | ) |
Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration of the USB device after enumeration - the device endpoints are configured and the CDC management task started.
| void EVENT_USB_Device_Connect | ( | void | ) |
Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs and starts the library USB task to begin the enumeration and USB management process.
| void EVENT_USB_Device_ControlRequest | ( | void | ) |
Event handler for the USB_ControlRequest event. This is used to catch and process control requests sent to the device from the USB host before passing along unhandled control requests to the library for processing internally.
| void EVENT_USB_Device_Disconnect | ( | void | ) |
Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via the status LEDs and stops the USB management and CDC management tasks.
| int main | ( | void | ) |
Main program entry point. This routine contains the overall program flow, including initial setup of all components and the main program loop.
| char * random_series | ( | int | n, |
| couleur * | bank | ||
| ) |
| void SetupHardware | ( | void | ) |
Configures the board hardware and chip peripherals for the demo's functionality.
| const char* CORRECT = "good" |
| int cpt = 0 |
| char history[6] = "" |
|
static |
Contains the current baud rate and other settings of the virtual serial port. While this demo does not use the physical USART and thus does not use these settings, they must still be retained and returned to the host upon request or the host will assume the device is non-functional.
These values are set by the host via a class-specific request, however they are not required to be used accurately. It is possible to completely ignore these value or use other settings as the host is completely unaware of the physical serial link characteristics and instead sends and receives data in endpoint streams.
| const char* MISS = "miss" |
| char* serie |
| const char* WRONG = "wrong" |