The wait in mci_WaitForEvent will delay all card transactions.

Dependencies:   FATFileSystem

Fork of EALib by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sdram.h Source File

sdram.h

00001 /*****************************************************************************
00002  *
00003  *   Copyright(C) 2011, Embedded Artists AB
00004  *   All rights reserved.
00005  *
00006  ******************************************************************************
00007  * Software that is described herein is for illustrative purposes only
00008  * which provides customers with programming information regarding the
00009  * products. This software is supplied "AS IS" without any warranties.
00010  * Embedded Artists AB assumes no responsibility or liability for the
00011  * use of the software, conveys no license or title under any patent,
00012  * copyright, or mask work right to the product. Embedded Artists AB
00013  * reserves the right to make changes in the software without
00014  * notification. Embedded Artists AB also make no representation or
00015  * warranty that such application will be suitable for the specified
00016  * use without further testing or modification.
00017  *****************************************************************************/
00018 #ifndef __SDRAM_H
00019 #define __SDRAM_H
00020 
00021 #include "stdint.h"
00022 
00023 /*
00024  * These timing parameters are based on the EMC clock
00025  * there is no way of ensuring what the EMC clock frequency is
00026  * without severely bloating the code
00027  * ENSURE THAT THE EMC clock is one of these values
00028  */
00029 #define SDRAM_SPEED_48 0
00030 #define SDRAM_SPEED_50 1
00031 #define SDRAM_SPEED_60 2
00032 #define SDRAM_SPEED_72 3
00033 #define SDRAM_SPEED_80 4
00034 
00035 #define SDRAM_SPEED SDRAM_SPEED_60
00036 
00037 #define SDRAM_CONFIG_32BIT
00038 #define SDRAM_SIZE               0x2000000
00039 
00040 #define SDRAM_BASE               0xA0000000 /*CS0*/
00041 
00042 /* Initializes the SDRAM.
00043  *
00044  * The entire SDRAM will be made available to malloc per default.
00045  *
00046  * Note that this functions is called internally if malloc requests
00047  * memory from SDRAM and that hasn't been disabled with a call to
00048  * sdram_disableMallocSdram().
00049  *
00050  * @returns 0 on success, 1 on failure
00051  */
00052 uint32_t sdram_init();
00053 
00054 /* Prevents malloc from using SDRAM.
00055  *
00056  * This function must be called before the first allocation that 
00057  * would have been in SDRAM. If a big allocation has already been
00058  * made then this call will do nothing as the SDRAM will have been
00059  * initialized and all SDRAM given to malloc.
00060  */
00061 void sdram_disableMallocSdram();
00062 
00063 #endif /* end __SDRAM_H */
00064 /****************************************************************************
00065 **                            End Of File
00066 *****************************************************************************/
00067 
00068