SAMV71 Xplained Ultra Software Package 1.4

main.c File Reference

#include "board.h"
#include <USBDescriptors.h>
#include <USBRequests.h>
#include "USBD.h"
#include <USBD_HAL.h>
#include <USBDDriver.h>
#include <VIDEODescriptors.h>
#include <USBVideo.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define VIDEO_WIDTH   320
#define VIDEO_HEIGHT   240
#define TWCK   400000
#define BOARD_PINS_TWI_ISI   PINS_TWI0
#define BOARD_ID_TWI_ISI   ID_TWIHS0
#define BOARD_BASE_TWI_ISI   TWIHS0
#define CAMX_MT9V022_SLAVE_ADDR   (0x30>>1)
#define ISI_BASE   SDRAM_CS_ADDR
#define USB_BASE   (ISI_BASE + VIDEO_WIDTH * VIDEO_HEIGHT)
#define ISI_MAX_PREV_BUFFER   10

Functions

void TWIHS0_Handler (void)
 TWI interrupt handler. Forwards the interrupt to the TWI driver handler.
void ISI_Handler (void)
 ISI interrupt handler.
void USBDCallbacks_RequestReceived (const USBGenericRequest *request)
void USBDDriverCallbacks_InterfaceSettingChanged (uint8_t interface, uint8_t setting)
int main (void)
 Application entry point for ISI USB video example.

Variables

const USBDDriverDescriptors usbdDriverDescriptors
const Pin pinsTWI [] = BOARD_PINS_TWI_ISI
const Pin pin_ISI_RST = BOARD_ISI_RST
const Pin pin_ISI_PWD = BOARD_ISI_PWD
const Pin pPinsISI [] = {BOARD_ISI_PINS}
COMPILER_WORD_ALIGNED
ISI_FrameBufferDescriptors 
preBufDescList
const sensorProfile_t mt9v022Profile

Detailed Description

This file contains all the specific code for example usb_video_gray

Contents

The code can be roughly broken down as follows:

Definition in file main.c.


Define Documentation

#define BOARD_BASE_TWI_ISI   TWIHS0

TWI base address for Sensor configuration

Definition at line 150 of file main.c.

#define BOARD_ID_TWI_ISI   ID_TWIHS0

TWI peripheral ID for Sensor configuration

Definition at line 148 of file main.c.

#define BOARD_PINS_TWI_ISI   PINS_TWI0

TWI Pins definition

Definition at line 145 of file main.c.

#define ISI_BASE   SDRAM_CS_ADDR

ISI DMA buffer base address

Definition at line 154 of file main.c.

#define ISI_MAX_PREV_BUFFER   10

Frame Buffer Descriptors , it depends on size of external memory, more is better

Definition at line 161 of file main.c.

#define TWCK   400000

TWI clock frequency in Hz.

Definition at line 142 of file main.c.

#define USB_BASE   (ISI_BASE + VIDEO_WIDTH * VIDEO_HEIGHT)

ISI DMA buffer base address

Definition at line 157 of file main.c.


Function Documentation

int main ( void   ) 

Application entry point for ISI USB video example.

Returns:
Unused (ANSI-C compatibility).

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

Here is the call graph for this function:

void USBDDriverCallbacks_InterfaceSettingChanged ( uint8_t  interface,
uint8_t  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 613 of file main.c.

Here is the call graph for this function:


Variable Documentation

const Pin pinsTWI[] = BOARD_PINS_TWI_ISI

ISI pins to configure.

Definition at line 174 of file main.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines