Subdirectory provided by Embedded Artists
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos mbed-src
Dependents: lpc4088_displaymodule_hello_world_Sept_2018
Fork of DMSupport by
sdram.h
00001 /* 00002 * Copyright 2014 Embedded Artists AB 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef __SDRAM_H 00018 #define __SDRAM_H 00019 00020 #include "stdint.h" 00021 00022 /* 00023 * These timing parameters are based on the EMC clock 00024 * there is no way of ensuring what the EMC clock frequency is 00025 * without severely bloating the code 00026 * ENSURE THAT THE EMC clock is one of these values 00027 */ 00028 #define SDRAM_SPEED_48 0 00029 #define SDRAM_SPEED_50 1 00030 #define SDRAM_SPEED_60 2 00031 #define SDRAM_SPEED_72 3 00032 #define SDRAM_SPEED_80 4 00033 00034 #define SDRAM_SPEED SDRAM_SPEED_60 00035 00036 #define SDRAM_CONFIG_32BIT 00037 #define SDRAM_SIZE 0x2000000 00038 00039 #define SDRAM_BASE 0xA0000000 /*CS0*/ 00040 00041 /* Initializes the SDRAM. 00042 * 00043 * The entire SDRAM will be made available to malloc per default. 00044 * 00045 * Note that this functions is called internally if malloc requests 00046 * memory from SDRAM and that hasn't been disabled with a call to 00047 * sdram_disableMallocSdram(). 00048 * 00049 * @returns 0 on success, 1 on failure 00050 */ 00051 uint32_t sdram_init(); 00052 00053 /* Prevents malloc from using SDRAM. 00054 * 00055 * This function must be called before the first allocation that 00056 * would have been in SDRAM. If a big allocation has already been 00057 * made then this call will do nothing as the SDRAM will have been 00058 * initialized and all SDRAM given to malloc. 00059 */ 00060 void sdram_disableMallocSdram(); 00061 00062 #endif /* end __SDRAM_H */ 00063 /**************************************************************************** 00064 ** End Of File 00065 *****************************************************************************/
Generated on Wed Jul 13 2022 02:57:23 by 1.7.2