The wait in mci_WaitForEvent will delay all card transactions.

Dependencies:   FATFileSystem

Fork of EALib by EmbeddedArtists AB

Committer:
dreschpe
Date:
Sun Dec 15 21:58:56 2013 +0000
Revision:
9:da373a015d07
Parent:
0:0fdadbc3d852
the wait in mci_WaitForEvent will delay all card transactions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 0:0fdadbc3d852 1 /*****************************************************************************
embeddedartists 0:0fdadbc3d852 2 *
embeddedartists 0:0fdadbc3d852 3 * Copyright(C) 2011, Embedded Artists AB
embeddedartists 0:0fdadbc3d852 4 * All rights reserved.
embeddedartists 0:0fdadbc3d852 5 *
embeddedartists 0:0fdadbc3d852 6 ******************************************************************************
embeddedartists 0:0fdadbc3d852 7 * Software that is described herein is for illustrative purposes only
embeddedartists 0:0fdadbc3d852 8 * which provides customers with programming information regarding the
embeddedartists 0:0fdadbc3d852 9 * products. This software is supplied "AS IS" without any warranties.
embeddedartists 0:0fdadbc3d852 10 * Embedded Artists AB assumes no responsibility or liability for the
embeddedartists 0:0fdadbc3d852 11 * use of the software, conveys no license or title under any patent,
embeddedartists 0:0fdadbc3d852 12 * copyright, or mask work right to the product. Embedded Artists AB
embeddedartists 0:0fdadbc3d852 13 * reserves the right to make changes in the software without
embeddedartists 0:0fdadbc3d852 14 * notification. Embedded Artists AB also make no representation or
embeddedartists 0:0fdadbc3d852 15 * warranty that such application will be suitable for the specified
embeddedartists 0:0fdadbc3d852 16 * use without further testing or modification.
embeddedartists 0:0fdadbc3d852 17 *****************************************************************************/
embeddedartists 0:0fdadbc3d852 18 #ifndef __SDRAM_H
embeddedartists 0:0fdadbc3d852 19 #define __SDRAM_H
embeddedartists 0:0fdadbc3d852 20
embeddedartists 0:0fdadbc3d852 21 #include "stdint.h"
embeddedartists 0:0fdadbc3d852 22
embeddedartists 0:0fdadbc3d852 23 /*
embeddedartists 0:0fdadbc3d852 24 * These timing parameters are based on the EMC clock
embeddedartists 0:0fdadbc3d852 25 * there is no way of ensuring what the EMC clock frequency is
embeddedartists 0:0fdadbc3d852 26 * without severely bloating the code
embeddedartists 0:0fdadbc3d852 27 * ENSURE THAT THE EMC clock is one of these values
embeddedartists 0:0fdadbc3d852 28 */
embeddedartists 0:0fdadbc3d852 29 #define SDRAM_SPEED_48 0
embeddedartists 0:0fdadbc3d852 30 #define SDRAM_SPEED_50 1
embeddedartists 0:0fdadbc3d852 31 #define SDRAM_SPEED_60 2
embeddedartists 0:0fdadbc3d852 32 #define SDRAM_SPEED_72 3
embeddedartists 0:0fdadbc3d852 33 #define SDRAM_SPEED_80 4
embeddedartists 0:0fdadbc3d852 34
embeddedartists 0:0fdadbc3d852 35 #define SDRAM_SPEED SDRAM_SPEED_60
embeddedartists 0:0fdadbc3d852 36
embeddedartists 0:0fdadbc3d852 37 #define SDRAM_CONFIG_32BIT
embeddedartists 0:0fdadbc3d852 38 #define SDRAM_SIZE 0x2000000
embeddedartists 0:0fdadbc3d852 39
embeddedartists 0:0fdadbc3d852 40 #define SDRAM_BASE 0xA0000000 /*CS0*/
embeddedartists 0:0fdadbc3d852 41
embeddedartists 0:0fdadbc3d852 42 /* Initializes the SDRAM.
embeddedartists 0:0fdadbc3d852 43 *
embeddedartists 0:0fdadbc3d852 44 * The entire SDRAM will be made available to malloc per default.
embeddedartists 0:0fdadbc3d852 45 *
embeddedartists 0:0fdadbc3d852 46 * Note that this functions is called internally if malloc requests
embeddedartists 0:0fdadbc3d852 47 * memory from SDRAM and that hasn't been disabled with a call to
embeddedartists 0:0fdadbc3d852 48 * sdram_disableMallocSdram().
embeddedartists 0:0fdadbc3d852 49 *
embeddedartists 0:0fdadbc3d852 50 * @returns 0 on success, 1 on failure
embeddedartists 0:0fdadbc3d852 51 */
embeddedartists 0:0fdadbc3d852 52 uint32_t sdram_init();
embeddedartists 0:0fdadbc3d852 53
embeddedartists 0:0fdadbc3d852 54 /* Prevents malloc from using SDRAM.
embeddedartists 0:0fdadbc3d852 55 *
embeddedartists 0:0fdadbc3d852 56 * This function must be called before the first allocation that
embeddedartists 0:0fdadbc3d852 57 * would have been in SDRAM. If a big allocation has already been
embeddedartists 0:0fdadbc3d852 58 * made then this call will do nothing as the SDRAM will have been
embeddedartists 0:0fdadbc3d852 59 * initialized and all SDRAM given to malloc.
embeddedartists 0:0fdadbc3d852 60 */
embeddedartists 0:0fdadbc3d852 61 void sdram_disableMallocSdram();
embeddedartists 0:0fdadbc3d852 62
embeddedartists 0:0fdadbc3d852 63 #endif /* end __SDRAM_H */
embeddedartists 0:0fdadbc3d852 64 /****************************************************************************
embeddedartists 0:0fdadbc3d852 65 ** End Of File
embeddedartists 0:0fdadbc3d852 66 *****************************************************************************/
embeddedartists 0:0fdadbc3d852 67
embeddedartists 0:0fdadbc3d852 68