SAMV71 Xplained Ultra Software Package 1.4

main.c File Reference

#include "board.h"
#include "USBD.h"
#include "CDCDSerialDriver.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Defines

#define DATAPACKETSIZE   (128)
#define DATABUFFERSIZE   (DATAPACKETSIZE+2)
#define PINS_USART   PIN_USART2_TXD, PIN_USART2_RXD
#define BASE_USART   USART2
#define ID_USART   ID_USART2
#define USART_TIMEOUT   115200
#define TEST_BUFFER_SIZE   (2*1024)
#define TEST_COUNT   (30)

Functions

void * memset (void *pBuffer, int value, size_t num)
void XDMAC_Handler (void)
 xDMA interrupt handler.
void USART2_Handler (void)
void USBDDriverCallbacks_ConfigurationChanged (unsigned char cfgnum)
void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
int main (void)
 Main function. Execution starts here.

Variables

const USBDDriverDescriptors cdcdSerialDriverDescriptors

Detailed Description

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

Definition in file main.c.


Define Documentation

#define BASE_USART   USART2

Register base for USART operation

Definition at line 105 of file main.c.

#define DATABUFFERSIZE   (DATAPACKETSIZE+2)

Size in bytes of the buffer used for reading data from the USB & USART

Definition at line 100 of file main.c.

#define DATAPACKETSIZE   (128)

Size in bytes of the packet used for reading data from the USB & USART

Definition at line 97 of file main.c.

#define ID_USART   ID_USART2

USART ID

Definition at line 107 of file main.c.

#define PINS_USART   PIN_USART2_TXD, PIN_USART2_RXD

Pins used for USART transfer

Definition at line 103 of file main.c.

#define TEST_BUFFER_SIZE   (2*1024)

test buffer size

Definition at line 111 of file main.c.

#define TEST_COUNT   (30)

write loop count

Definition at line 113 of file main.c.


Function Documentation

void USBDCallbacks_RequestReceived ( const USBGenericRequest request  ) 

Invoked when a new SETUP request is received from the host. Forwards the request to the Mass Storage device driver handler function.

Parameters:
request Pointer to a USBGenericRequest instance.

Definition at line 238 of file main.c.

Here is the call graph for this function:

void USBDDriverCallbacks_ConfigurationChanged ( unsigned char  cfgnum  ) 

Invoked when the configuration of the device changes. Parse used endpoints.

Parameters:
cfgnum New configuration number.

Definition at line 228 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines