SAMV71 Xplained Ultra Software Package 1.3

main.c File Reference

#include "board.h"
#include <USBD_Config.h>
#include <DUALCDCDDriver.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define DATAPACKETSIZE   CHIP_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAIN)
#define DATABUFFERSIZE   (DATAPACKETSIZE+2)
#define PINS_USART   PIN_USART1_TXD, PIN_USART1_RXD
#define BASE_USART   USART1
#define ID_USART   ID_USART1

Functions

void USBDDriverCallbacks_ConfigurationChanged (uint8_t cfgnum)
void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
void XDMAC_Handler (void)
 xDMA interrupt handler.
void TC0_Handler (void)
void USART1_Handler (void)
 USART ISR for wakeup from sleep mode.
int main (void)

Variables

const USBDDriverDescriptors dualcdcdDriverDescriptors
 List of descriptors required by an USB audio speaker device driver.

Detailed Description

This file contains all the specific code for the usb_iad_cdc_cdc

Definition in file main.c.


Define Documentation

#define BASE_USART   USART1

Register base for USART operation

Definition at line 139 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 134 of file main.c.

#define DATAPACKETSIZE   CHIP_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAIN)

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

Definition at line 130 of file main.c.

#define ID_USART   ID_USART1

USART ID

Definition at line 141 of file main.c.

#define PINS_USART   PIN_USART1_TXD, PIN_USART1_RXD

Pins used for USART transfer

Definition at line 137 of file main.c.


Function Documentation

int main ( void   ) 

Initializes drivers and start the USB Dual CDC device.

Definition at line 602 of file main.c.

Here is the call graph for this function:

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 205 of file main.c.

Here is the call graph for this function:

void USBDDriverCallbacks_ConfigurationChanged ( uint8_t  cfgnum  ) 

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

Parameters:
cfgnum New configuration number.

Definition at line 195 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines