#include "board.h"
#include "libsdmmc.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 64 |
#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 | TEST_PERFORMENCT_SIZE (4*1024*1024) |
#define | TEST_FILL_VALUE_U32 (0x5A6C1439) |
#define | NB_ERRORS 3 |
#define | NB_BAD_BLOCK 200 |
#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_Read(pSd, blk, pData, nbBlk, NULL, NULL) |
#define | MMCT_WriteFun(pSd, blk, nbBlk, pData) SD_Write(pSd, blk, pData, nbBlk, NULL, NULL) |
Functions |
void | XDMAC_Handler (void) |
| xDMA interrupt handler.
|
void | HSMCI_Handler (void) |
int | main (void) |
| hsmci_multimedia_card Application entry point.
|
Detailed Description
This file contains all the specific code for the hsmci_multimedia_card example.
Purpose
Contents
The hsmci_multimedia_card application can be roughly broken down as follows:
- Optional functions for detection (card insert, card protect)
- CardDetectConfigure(), CardIsConnected()
- CardIsProtected()
- Interrupt handlers
- The main function, which implements the program behaviour
- I/O configuration
- SD/MMC card auto-detect write-protected-check (if supported)
- Initialize MCI interface and installing an isr relating to MCI
- Initialize sdcard, get necessary sdcard's parameters
- write/read sdcard
Definition in file main.c.
Define Documentation
#define MMCT_ReadFun |
( |
|
pSd, |
|
|
|
blk, |
|
|
|
nbBlk, |
|
|
|
pData | |
|
) |
| | SD_Read(pSd, blk, pData, nbBlk, NULL, NULL) |
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 229 of file main.c.
#define MMCT_WriteFun |
( |
|
pSd, |
|
|
|
blk, |
|
|
|
nbBlk, |
|
|
|
pData | |
|
) |
| | SD_Write(pSd, blk, pData, nbBlk, NULL, NULL) |
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 244 of file main.c.
Number of bad blocks displayed
Definition at line 173 of file main.c.
Number of errors displayed
Definition at line 170 of file main.c.
#define NB_MULTI_BLOCKS 64 |
Maximum number of blocks read once (for performance test)
Definition at line 149 of file main.c.
Split R/W to 2, first R/W 4 blocks then remaining
Definition at line 152 of file main.c.
#define TEST_BLOCK_END SD_GetNumberBlocks(&sdDrv[bMciID]) |
Test settings: end block address (total SD/MMC)
Definition at line 158 of file main.c.
#define TEST_BLOCK_SKIP (100 * 1024 * 2) |
Test settings: skip size when "skip" key pressed
Definition at line 161 of file main.c.
#define TEST_BLOCK_START (0) |
Test settings: start block address (0)
Definition at line 155 of file main.c.
#define TEST_FILL_VALUE_U32 (0x5A6C1439) |
Test settings: The value used to generate test data
Definition at line 167 of file main.c.
#define TEST_PERFORMENCT_SIZE (4*1024*1024) |
Test settings: Number of bytes to test performance
Definition at line 164 of file main.c.
Function Documentation
hsmci_multimedia_card Application entry point.
- Returns:
- Unused (ANSI-C compatibility).
Definition at line 1019 of file main.c.