AVRISP-MKII Clone Programmer Project

Data Structures | Macros | Enumerations | Functions
AVRISPDescriptors.h File Reference
`#include <avr/pgmspace.h>`
`#include <LUFA/Drivers/USB/USB.h>`
`#include <LUFA/Drivers/Board/LEDs.h>`
`#include "Config/AppConfig.h"`

## Data Structures

struct | AVRISP_USB_Descriptor_Configuration_t

## Macros

#define | AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)
#define | AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)
#define | AVRISP_DATA_EPSIZE 64

## Enumerations

enum | InterfaceDescriptors_t { INTERFACE_ID_AVRISP = 0 }
enum | AVRISP_StringDescriptors_t { AVRISP_STRING_ID_Language = 0, AVRISP_STRING_ID_Manufacturer = 1, AVRISP_STRING_ID_Product = 2, AVRISP_STRING_ID_Serial = 3
}

## Functions

uint16_t | AVRISP_GetDescriptor (const uint16_t wValue, const uint16_t wIndex, const void **const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3)

## Detailed Description

Header file for Descriptors.c.

## Macro Definition Documentation

## § AVRISP_DATA_EPSIZE

#define AVRISP_DATA_EPSIZE 64

Size in bytes of the AVRISP data endpoint.

## § AVRISP_DATA_IN_EPADDR

#define AVRISP_DATA_IN_EPADDR (ENDPOINT_DIR_IN | 2)

Endpoint address of the AVRISP data IN endpoint.

## § AVRISP_DATA_OUT_EPADDR

#define AVRISP_DATA_OUT_EPADDR (ENDPOINT_DIR_OUT | 2)

Endpoint address of the AVRISP data OUT endpoint.

## Enumeration Type Documentation

## § AVRISP_StringDescriptors_t

enum AVRISP_StringDescriptors_t

Enum for the device string descriptor IDs within the device. Each string descriptor should have a unique ID index associated with it, which can be used to refer to the string from other descriptors.

Enumerator
AVRISP_STRING_ID_Language | Supported Languages string descriptor ID (must be zero)
AVRISP_STRING_ID_Manufacturer | Manufacturer string ID
AVRISP_STRING_ID_Product | Product string ID
AVRISP_STRING_ID_Serial | Serial number string ID

## § InterfaceDescriptors_t

enum InterfaceDescriptors_t

Enum for the device interface descriptor IDs within the device. Each interface descriptor should have a unique ID index associated with it, which can be used to refer to the interface from other descriptors.

Enumerator
INTERFACE_ID_AVRISP | AVRISP interface descriptor ID

## Function Documentation

## § AVRISP_GetDescriptor()

uint16_t AVRISP_GetDescriptor | ( | const uint16_t | wValue,
|  | const uint16_t | wIndex,
|  | const void **const | DescriptorAddress
| ) |  |

This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" documentation) by the application code so that the address and size of a requested descriptor can be given to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the USB host.