Defines | Functions

lufa_serial.h File Reference

Header file for VirtualSerial.c. More...

#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <string.h>
#include "Descriptors.h"
#include <LUFA/Version.h>
#include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Drivers/Board/LEDs.h>

Go to the source code of this file.

Defines

#define LEDMASK_USB_NOTREADY   LEDS_LED1
 LED mask for the library LED driver, to indicate that the USB interface is not ready.
#define LEDMASK_USB_ENUMERATING   (LEDS_LED2 | LEDS_LED3)
 LED mask for the library LED driver, to indicate that the USB interface is enumerating.
#define LEDMASK_USB_READY   (LEDS_LED2 | LEDS_LED4)
 LED mask for the library LED driver, to indicate that the USB interface is ready.
#define LEDMASK_USB_ERROR   (LEDS_LED1 | LEDS_LED3)
 LED mask for the library LED driver, to indicate that an error has occurred in the USB interface.

Functions

void SetupHardware (void)
void CDC_Task (void)
void EVENT_USB_Device_Connect (void)
 Event handler for the USB_Connect event.
void EVENT_USB_Device_Disconnect (void)
 Event handler for the USB_Disconnect event.
void EVENT_USB_Device_ConfigurationChanged (void)
 Event handler for the USB_ConfigurationChanged event.
void EVENT_USB_Device_ControlRequest (void)
 Event handler for the USB_ControlRequest event.

Detailed Description

Header file for VirtualSerial.c.


Define Documentation

#define LEDMASK_USB_ENUMERATING   (LEDS_LED2 | LEDS_LED3)

LED mask for the library LED driver, to indicate that the USB interface is enumerating.

Referenced by EVENT_USB_Device_Connect().

#define LEDMASK_USB_ERROR   (LEDS_LED1 | LEDS_LED3)

LED mask for the library LED driver, to indicate that an error has occurred in the USB interface.

Referenced by EVENT_USB_Device_ConfigurationChanged().

#define LEDMASK_USB_NOTREADY   LEDS_LED1

LED mask for the library LED driver, to indicate that the USB interface is not ready.

Referenced by EVENT_USB_Device_Disconnect(), and serial_init().

#define LEDMASK_USB_READY   (LEDS_LED2 | LEDS_LED4)

LED mask for the library LED driver, to indicate that the USB interface is ready.

Referenced by EVENT_USB_Device_ConfigurationChanged().


Function Documentation

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.

 All Data Structures Files Functions Variables Defines