SAMV71 Xplained Ultra Software Package 1.5

main.c File Reference

#include "board.h"
#include "USBD_LEDs.h"
#include "USBD_Config.h"
#include "AUDDSpeakerPhoneDriver.h"
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Defines

#define BUFFER_NUMBER   8
#define BUFFER_SIZE

Functions

 COMPILER_ALIGNED (32)
void USBDDriverCallbacks_ConfigurationChanged (unsigned char cfgnum)
void USBDDriverCallbacks_InterfaceSettingChanged (unsigned char interface, unsigned char setting)
void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
void AUDDSpeakerPhoneDriver_MuteChanged (uint8_t mic, uint8_t channel, uint8_t muted)
void AUDDSpeakerPhoneDriver_StreamSettingChanged (uint8_t mic, uint8_t newSetting)
int main (void)
 usb_audio_looprec Application entry point.

Variables

const USBDDriverDescriptors auddSpeakerPhoneDriverDescriptors

Detailed Description

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

Definition in file main.c.


Define Documentation

#define BUFFER_NUMBER   8

Number of available audio buffers.

Definition at line 122 of file main.c.

#define BUFFER_SIZE
Value:
(AUDDevice_BYTESPERFRAME \
                             + AUDDevice_BYTESPERSUBFRAME)

Size of one buffer in bytes.

Definition at line 124 of file main.c.


Function Documentation

void AUDDSpeakerPhoneDriver_MuteChanged ( uint8_t  mic,
uint8_t  channel,
uint8_t  muted 
)

Invoked when an audio channel get muted or unmuted. Mutes/unmutes the channel at the DAC level.

Parameters:
mic Microphone/Speaker stream changed.
channel Channel number that changed.
muted Indicates the new mute status of the channel.

Definition at line 238 of file main.c.

void AUDDSpeakerPhoneDriver_StreamSettingChanged ( uint8_t  mic,
uint8_t  newSetting 
)

Invoked when an audio streaming interface setting changed. Audio stream is automatically reset. Actually control streaming rate.

Parameters:
mic Microphone/Speaker stream changed.
newSetting New stream (interface) setting.

Definition at line 259 of file main.c.

COMPILER_ALIGNED ( 32   ) 

Data buffers for receiving audio frames from the USB host.

Definition at line 139 of file main.c.

Here is the call graph for this function:

int main ( void   ) 

usb_audio_looprec Application entry point.

Starts the driver and waits for an audio input stream to forward to the DAC.

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

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

Here is the call graph for this function:

void USBDDriverCallbacks_InterfaceSettingChanged ( unsigned char  interface,
unsigned char  setting 
)

Invoked whenever the active setting of an interface is changed by the host. Reset streaming interface.

Parameters:
interface Interface number.
setting Newly active setting.

Definition at line 216 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines