emWin使用外部SRAM的方法
我用的是stm32,加了1MB的外部SRAM,在使用emWin的时候,将一部分内存分配给emWin使用。其实方法很简单,传入SRAM数据总线地址即可,数据位宽我采用16bit,因为使用的SRAM是16bit的,这样做比较合适。如果是在ARM9及以上的平台上使用,依葫芦画瓢的把DDRAM的物理地址传入emWin即可,不过地址位宽一般是32位的,大小由自己决定。
/*********************************************************************
* SEGGER Microcontroller GmbH & Co. KG *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2013 SEGGER Microcontroller GmbH & Co. KG *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
********************************************************************** ** emWin V5.18 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms: The software has been licensed to NXP Semiconductors USA, Inc. whose
registered office is situated at 411 E. Plumeria Drive, San Jose,
CA 95134, USA solely for the purposes of creating libraries for
NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and
distributed under the terms and conditions of the NXP End User License
Agreement.
Full source code is available at: www.segger.com We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : GUIConf.c
Purpose : Display controller initialization
---------------------------END-OF-HEADER------------------------------
*/ #include "GUI.h"
#include "SRAM_Driver.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
//
// Define the available number of bytes available for the GUI
//
#define Bank1_SRAM3_ADDR ((u32)0x68000000)
#define GUI_NUMBYTES (1024*700)
//
// Define the average block size
//
#define GUI_BLOCKSIZE 0x80 /*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* GUI_X_Config
*
* Purpose:
* Called during the initialization process in order to set up the
* available memory for the GUI.
*/
void GUI_X_Config(void) {
//
// 16 bit aligned memory area
//
volatile U16* aMemory = (volatile U16*)(Bank1_SRAM3_ADDR);
//
// Assign memory to emWin
//
GUI_ALLOC_AssignMemory((void*)aMemory, GUI_NUMBYTES);
GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE);
//
// Set default font
//
GUI_SetDefaultFont(GUI_FONT_6X8);
} /*************************** End of file ****************************/
emWin使用外部SRAM的方法的更多相关文章
- 外部SRAM实验,让STM32的外部SRAM操作跟内部SRAM一样(转)
源:外部SRAM实验,让STM32的外部SRAM操作跟内部SRAM一样 前几天看到开源电子论坛(openedv.com)有人在问这个问题,我特意去做了这个实验,这样用外部SRAM就跟用内部SRAM一样 ...
- jar包读取jar包内部和外部的配置文件,springboot读取外部配置文件的方法
jar包读取jar包内部和外部的配置文件,springboot读取外部配置文件的方法 用系统属性System.getProperty("user.dir")获得执行命令的目录(网上 ...
- spark读取外部配置文件的方法
spark读取外部配置文件的方法 spark-submit --files /tmp/fileName /tmp/test.jar 使用spark提交时使用--files参数,spark会将将本地的 ...
- java中main函数怎么调用外部非static方法
使用外部方法时(不管是static还是非static),都要先new一个对象,才能使用该对象的方法. 举例如下: 测试函数(这是错误的): public class Test { public sta ...
- Django加入JS,CSS,图片等外部文件的方法
Django加入JS,CSS.图片等外部文件的方法 By 白熊花田(http://blog.csdn.net/whiterbear) 转载需注明出处,谢谢. 在使用Django搭建站点时,往往须要使用 ...
- 外部SRAM的种类
外部SRAM注意事项 为使外部SRAM器件达到出最佳性能,建议遵循以下原则: 使用与连接的主系统控制器的接口数据带宽相同的SRAM. 如果管脚使用或板上空间的限制高于系统性能要求,可以使用较连接的控制 ...
- 在程序中通过Process启动外部exe的方法及注意事项
启动外部进程的方法: /// <summary> /// 启动外部进程 /// </summary> /// <param name="path"&g ...
- SpringBoot读取外部配置文件的方法
SpringBoot读取外部配置文件的方法 Spring高级之注解@PropertySource详解(超详细) 1.@PropertySource(value = {"classpath:c ...
- nodejs 提示‘xxx’ 不是内部或外部命令解决方法
本文介绍了node.js包管理工具npm安装模块后,无法通过命令行执行命令,提示‘xxx’ 不是内部或外部命令的解决方法,给需要的小伙伴参考下. 一般出现这样的问题原因是npm安装出现了问题,全局 ...
随机推荐
- POJ 1852 Ants (等价思考)
题意:在一根杆上有 n 只蚂蚁,速度为1,方向不定,如果相碰,则反向运动,问你最长的时间和最短时间,所有蚂蚁都掉下杆去. 析:换个方法想,如果两只蚂蚁相碰了,会有什么现象?其实就和没有碰撞是一样的,没 ...
- 1005. 继续(3n+1)猜想 (25)
卡拉兹(Callatz)猜想已经在1001中给出了描述.在这个题目里,情况稍微有些复杂. 当我们验证卡拉兹猜想的时候,为了避免重复计算,可以记录下递推过程中遇到的每一个数.例如对n=3进行验证的时候, ...
- poj3468A Simple Problem with Integers(线段树,在段更新时要注意)
Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. On ...
- Castle IOC容器组件生命周期管理
主要内容 1.生命处理方式 2.自定义生命处理方式 3.生命周期处理 一.生命处理方式 我们通常创建一个组件的实例使用new关键字,这样每次创建出来的都是一个新的实例,如果想要组件只有一个实例,我们会 ...
- __ARM_PROFILE_M__ __CORE__ __ARMVFP__ __LITTLE_ENDIAN__
__ARM_PROFILE_M__ Description An integer that is set based on the --cpu option. The symbol is set to ...
- ArcSDE 10.2建立SDE服务
从ArcGIS 10.1开始,arcgis官方推荐以直连方式连接SDE,因此在SDE安装时不再自动安装SDE服务,以下是手动安装SDE服务的方法 环境 服务端: oracle 11.2 64位,Arc ...
- zTree实现基本树
zTree实现基本树 1.实现源代码 <!DOCTYPE html> <html> <head> <title>zTree实现基本树</title ...
- C++ Interview - using new and delete to alloc and free memory
1. dynamic create object and initialization int *pi = new int; // pi points to an uninitialized int ...
- nicehair
https://github.com/lanyj189/nicehair https://github.com/eltld/nicehair https://github.com/pepoc/Cust ...
- [Angular2 Form] Group Inputs in Angular 2 Forms with ngModelGroup
The ngModelGroup directive allows you to group together related inputs so that you structure the obj ...