wince6.0下的GPIO口操作(s3c6410)
来源:互联网 发布:软件著作权名称变更 编辑:程序博客网 时间:2024/06/07 05:24
文章转载自:
http://blog.163.com/caina1984@126/blog/static/1016069772011112143852940/
GPIO的操作流程大致为:
volatile S3C6410_GPIO_REG *pIOPregs = NULL; // GPIO registers
pIOPregs = (volatile S3C6410_GPIO_REG*)TSP_RegAlloc((PVOID)S3C6410_BASE_REG_PA_GPIO, sizeof(S3C6410_GPIO_REG));
if (pIOPregs == NULL)
{
RETAILMSG(1,(TEXT("HcdPdd_Init -> g_pIOPregs: VirtualAlloc failed!\r\n")));
if (pIOPregs == NULL)
{
RETAILMSG(1,(TEXT("HcdPdd_Init -> g_pIOPregs: VirtualAlloc failed!\r\n")));
}
pIOPregs->GPEPUD = (pIOPregs->GPEPUD & ~(0x3<<8)) |(0x1 << 8); //gpe4 pull down enable
pIOPregs->GPECON = (pIOPregs->GPECON & ~(0x3<<16)) | (0x1<<16); //GPE4 as output port
pIOPregs->GPEDAT = (pIOPregs->GPEDAT & ~(0x1<<4)) ;
pIOPregs->GPECON = (pIOPregs->GPECON & ~(0x3<<16)) | (0x1<<16); //GPE4 as output port
pIOPregs->GPEDAT = (pIOPregs->GPEDAT & ~(0x1<<4)) ;
地址映射也可以用
g_pGPIOReg = (S3C6410_GPIO_REG *)DrvLib_MapIoSpace(S3C6410_BASE_REG_PA_GPIO, sizeof(S3C6410_GPIO_REG), FALSE);
A000 0000 - C000 0000是无缓存的
8000 0000 - A000 0000是有缓存的
DCD 0x91600000, 0x56000000, 1 ; I/O Port register 有说是:0x41600000+(0x8000 0000 - 0x3000 0000) = 0x91600000 具体不详
文章来源:http://www.cnblogs.com/urbetter/archive/2010/01/29/1659101.html
- wince6.0下的GPIO口操作(s3c6410)
- Linux下s3c6410的GPIO操作(1)
- Linux下s3c6410的GPIO操作(2)
- Linux下s3c6410的GPIO操作(3)
- Linux下s3c6410的GPIO操作(4)
- Linux下s3c6410的GPIO操作(5)
- Linux下s3c6410的GPIO操作(6)
- Linux下s3c6410的GPIO操作(7)
- s3c6410的GPIO操作
- WINCE6.0+S3C6410下的DM9000A驱动
- S3C6410的GPIO基本操作(点亮LED)
- 基于WINCE6.0+S3C6410的背光驱动
- WINCE6.0+S3C6410的触摸屏驱动
- WINCE6.0+S3C6410的触摸屏驱动
- 基于WINCE6.0+S3C6410的背光驱动
- WINCE6.0+S3C6410的触摸屏驱动
- WINCE6.0+S3C6410的触摸屏驱动
- WINCE6.0+S3C6410的触摸屏驱动
- 例题6.3.2
- innodb_open_files 是如何影响 mysql性能的
- MongoDB 中建立新数据库和集合
- Weblogic 生产环境去除缓存
- JQuery获取this当前对象子元素对象
- wince6.0下的GPIO口操作(s3c6410)
- 模仿那个酷的html5
- phpinfo()检查后提示的PHP错误提示
- segmentation fault
- HOJ 2808 Cylinder
- EAS中列表界根据组织过滤
- Java语言的特点
- 友坚android210开发板android4.0系统+7寸电阻屏
- 利用HTML5使文字转图片【长微博生成器】