SAMV71 Xplained Ultra Software Package 1.4

main.c File Reference

#include "board.h"
#include "libsdmmc.h"
#include "Media.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define NB_MULTI_BLOCKS   5
#define NB_SPLIT_MULTI   4
#define TEST_BLOCK_START   (0)
#define TEST_BLOCK_END   SD_GetNumberBlocks(&sdDrv[bMciID])
#define TEST_BLOCK_SKIP   (100 * 1024 * 2)
#define NB_ERRORS   5
#define READ_MULTI
 Define to test multi-read (SD_Read()) or single-read is used (SD_ReadBlocks()).
#define WRITE_MULTI
 Define to test multi-write (SD_Write()) or single-write is used (SD_WriteBlocks()).
#define MMCT_ReadFun(pSd, blk, nbBlk, pData)   SD_ReadBlocks(pSd, blk, pData, nbBlk)
#define MMCT_WriteFun(pSd, blk, nbBlk, pData)   SD_WriteBlocks(pSd, blk, pData, nbBlk)

Functions

void XDMAC_Handler (void)
 xDMA interrupt handler.
void HSMCI_Handler (void)
int main (void)
 hsmci_sdcard Application entry point.

Detailed Description

Purpose

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

Contents

The hsmci_sdcard application can be roughly broken down as follows:

Definition in file main.c.


Define Documentation

#define MMCT_ReadFun (   pSd,
  blk,
  nbBlk,
  pData 
)    SD_ReadBlocks(pSd, blk, pData, nbBlk)

SDT_ReadFun Function used for SD card test reading.

Parameters:
pSd Pointer to a SD card driver instance.
address Address of the block to read.
nbBlocks Number of blocks to be read.
pData Data buffer whose size is at least the block size.

Definition at line 198 of file main.c.

#define MMCT_WriteFun (   pSd,
  blk,
  nbBlk,
  pData 
)    SD_WriteBlocks(pSd, blk, pData, nbBlk)

SDT_WriteFun Function used for SD card test writing.

Parameters:
pSd Pointer to a SD card driver instance.
address Address of the block to read.
nbBlocks Number of blocks to be read.
pData Data buffer whose size is at least the block size.

Definition at line 213 of file main.c.

#define NB_ERRORS   5

Number of errors displayed

Definition at line 140 of file main.c.

#define NB_MULTI_BLOCKS   5

Maximum number of blocks read once

Definition at line 125 of file main.c.

#define NB_SPLIT_MULTI   4

Split R/W to 2, first R/W 4 blocks then remaining

Definition at line 128 of file main.c.

#define TEST_BLOCK_END   SD_GetNumberBlocks(&sdDrv[bMciID])

Test settings: end block address (total SD/MMC)

Definition at line 134 of file main.c.

#define TEST_BLOCK_SKIP   (100 * 1024 * 2)

Test settings: skip size when "skip" key pressed

Definition at line 137 of file main.c.

#define TEST_BLOCK_START   (0)

Test settings: start block address (0)

Definition at line 131 of file main.c.


Function Documentation

int main ( void   ) 

hsmci_sdcard Application entry point.

Returns:
Unused (ANSI-C compatibility).

Definition at line 601 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines