SAMV71 Xplained Ultra Software Package 1.3

main.c File Reference

#include "board.h"
#include <USBDescriptors.h>
#include <USBRequests.h>
#include "USBD.h"
#include <USBDDriver.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  SimpleConfigurationDescriptors

Functions

void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
int main (void)

Variables

const USBDeviceDescriptor usbDeviceDescriptor
struct
SimpleConfigurationDescriptors 
configurationDescriptors
const USBDDriverDescriptors usbdDriverDescriptors
USBDDriver usbdDriver

Detailed Description

This file contains all the specific code for the usb_core example.

Contents

The code can be roughly broken down as follows:

Definition in file main.c.


Function Documentation

int main ( void   ) 

Initializes the system, connects the USB and waits indefinitely.

Definition at line 237 of file main.c.

Here is the call graph for this function:

void USBDCallbacks_RequestReceived ( const USBGenericRequest request  ) 

Invoked whenever a SETUP request is received from the host. Forwards the request to the standard handler.

Definition at line 201 of file main.c.

Here is the call graph for this function:


Variable Documentation

Initial value:
 {

    
    {
        sizeof(USBConfigurationDescriptor),
        USBGenericDescriptor_CONFIGURATION,
        sizeof(struct SimpleConfigurationDescriptors),
        0, 
        1, 
        0, 
        BOARD_USB_BMATTRIBUTES,
        USBConfigurationDescriptor_POWER(100)
    },
    
    {
        sizeof(USBInterfaceDescriptor),
        USBGenericDescriptor_INTERFACE,
        0, 
        0, 
        0, 
        0, 
        0, 
        0, 
        0, 
    }
}

Configuration descriptors.

Definition at line 151 of file main.c.

USB standard device driver.

Definition at line 194 of file main.c.

Initial value:
 {

    &usbDeviceDescriptor,
    (const USBConfigurationDescriptor *) &configurationDescriptors,
    0, 
    0, 
    0, 
    0, 
    0, 
    0, 
    0, 
    0  
}

List of descriptors used by the device.

Definition at line 179 of file main.c.

const USBDeviceDescriptor usbDeviceDescriptor
Initial value:
 {

    sizeof(USBDeviceDescriptor),
    USBGenericDescriptor_DEVICE,
    USBDeviceDescriptor_USB2_00,
    0, 
    0, 
    0, 
    CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
    0x03EB, 
    0x0001, 
    0x0001, 
    0, 
    0, 
    0, 
    1 
}

Device descriptor.

Definition at line 132 of file main.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines