6410虚拟字符设备读写测试程序

摘要: View Code 1 #include <linux/init.h> 2 #include <linux/kernel.h> 3 #include <linux/module.h> 4 #include <linux/types.h> 5 #include <linux/fs.h> 6 #include <linux/errno.h> 7 #include <linux/mm.h> 8 #include <linux/sched.h> 9 #include <linux/cdev.h> 阅读全文
posted @ 2012-07-01 11:00 小虫儿 阅读(204) 评论(0) 推荐(0) 编辑

arm启动代码分析(转)

摘要: ARM启动代码分析 from: http://www.chinaeda.cn/show.aspx?id=203&cid=6基于ARM的芯片多数为复杂的片上系统,这种复杂系统里的多数硬件模块都是可配置的,需要由软件来设置其需要的工作状态。因此在用户的应用程序之前,需要由专门的一段代码来完成对系统的初始化。由于这类代码直接面对处理器内核和硬件控制器进行编程,一般都是用汇编语言。一般通用的内容包括:中断向量表初始化存储器系统初始化堆栈初始化有特殊要求的断口,设备初始化用户程序执行环境改变处理器模式呼叫主应用程序 1. 中断向量表ARM要求中断向量表必须放置在从0地址开始,连续8X4字节的空间 阅读全文
posted @ 2012-06-18 23:40 小虫儿 阅读(524) 评论(0) 推荐(0) 编辑

ok6410的定时器0 测试程序

摘要: 1 #include "def.h" 2 #include "gpio.h" 3 #include "library.h" 4 #include "system.h" 5 #include "timer.h" 6 #include "intc.h" 7 #include "sfr6410.h" 8 9 /* 10 11 此函数的功能仅仅在于测试TIMER0的定时功能,以最简单的形式展示 “初始化定时器以及相关中断” 12 上述头文件在国嵌资料中有提供。 1 阅读全文
posted @ 2012-06-15 23:20 小虫儿 阅读(1213) 评论(0) 推荐(0) 编辑

OK6410的UART0串口程序简单测试

摘要: 1 /* 2 此文件主要学习如何配置UART0,怎样单字符输入和输出, 怎样进行字符串的输入和输出; 3 */ 4 #include <stdarg.h> 5 #include "def.h" 6 7 #include "system.h" 8 #include "sysc.h" 9 #include "uart.h" 10 11 #define Inp32(ADDR) *((volatile u32 *)ADDR) 12 #define Outp32(ADDR,data) *((volatile u3 阅读全文
posted @ 2012-06-15 23:13 小虫儿 阅读(2334) 评论(0) 推荐(0) 编辑

ok6410的 ADC中断触发转换 实验

摘要: View Code 1 #include "library.h" 2 #include "system.h" 3 #include "sysc.h" 4 #include "adcts.h" 5 #include "intc.h" 6 7 #define ADCTS ((volatile oADCTS_REGS*)ADCTS_BASE) 8 9 void Adcts_Init(int channal, u32 freq);10 void __irq Adcts_Isr(void);11 void 阅读全文
posted @ 2012-06-11 19:50 小虫儿 阅读(672) 评论(0) 推荐(1) 编辑

关于ok6410的c语言环境初始化,以及点亮led程序

摘要: startup.sView Code 1 IMPORT |Image$$RO$$Limit| 2 IMPORT |Image$$RW$$Base| 3 IMPORT |Image$$ZI$$Base| 4 IMPORT |Image$$ZI$$Limit| 5 6 IMPORT Main 7 IMPORT InitStack 8 ... 阅读全文
posted @ 2012-06-06 23:48 小虫儿 阅读(768) 评论(0) 推荐(0) 编辑

基于国嵌ok6410的按键0外部中断的例程

摘要: View Code 1 #include"gpio.h" 2 #include"def.h" 3 #include "system.h" 4 #include "intc.h" 5 /* 6 本例简单展示中断需要配置的 中断向量涉及的寄存器:void IRQINIT(void); 7 和 外部中断0的引脚关联的寄存器相关配置: void KeyInit(int key_num); 8 */ 9 10 11 #define BASE 0X7F008000 12 #define GPIO ((o... 阅读全文
posted @ 2012-06-06 23:43 小虫儿 阅读(1032) 评论(0) 推荐(0) 编辑

基于国嵌ok6410教学视频的“定时器0中断"实验

摘要: View Code 1 #include "def.h" 2 #include "gpio.h" 3 #include "library.h" 4 #include "system.h" 5 #include "timer.h" 6 #include "intc.h" 7 #include "sfr6410.h" 8 9 /* 10 11 此函数的功能仅仅在于测试TIMER0的定时功能,以最简单的形式展示 “初始化定时器以及相关中断” 12 上述头文件在国 阅读全文
posted @ 2012-06-06 23:01 小虫儿 阅读(542) 评论(0) 推荐(0) 编辑

c语言环境初始化的问题

摘要: http://blog.chinaunix.net/uid-25690028-id-2979442.html关于RO,RW,ZI段的介绍 阅读全文
posted @ 2012-06-03 17:12 小虫儿 阅读(117) 评论(0) 推荐(0) 编辑

samba服务配置

摘要: 1.先查看samba的包是否全部安装,没有则用yum安装;2.vim /etc/samba/smb.conf配置smb服务文件;基本如图所示就可以了;3.useradd rzchong 创建smb用户;(root不用创建)4.smbpasswd -a rzchong ; smbpasswd -a root ;(为rzchong用户,及root创建smb密码);5./etc/init.d/smb restart 重启让其生效;6.在windows xp运行\\192.168.1.98,输入密码进入目录; 阅读全文
posted @ 2012-05-31 23:35 小虫儿 阅读(127) 评论(0) 推荐(0) 编辑