主题 : linux下怎样对pwm的寄存器操作? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 2599
精华: 0
发帖: 9
金钱: 90 两
威望: 81 点
综合积分: 18 分
注册时间: 2008-11-26
最后登录: 2010-01-23
楼主  发表于: 2009-06-11 16:28

 linux下怎样对pwm的寄存器操作?

我的问题是linux下怎样对pwm的寄存器操作?
gpio有写好的函数如s3c2410_gpio_cfgpin()对io口控制,在kernel-2.6.13/arch/arm/mach-s3c2410/gpio.c文件中,那如何对pwm控制呢?好像没有pwm.c这个文件的?
如果没有写好的函数,那么要对pwm的寄存器S3C2410_TCFG0,S3C2410_TCFG1是不是可以直接赋值?  这些寄存器在kernel-2.6.13\include\asm-arm\arch-s3c2410\regs-timer.h里有定义:
#define S3C2410_TCFG0      S3C2410_TIMERREG(0x00)
#define S3C2410_TCFG1          S3C2410_TIMERREG(0x04)

还是linux下还现需要先进行ioremap()进行地址重映射?
级别: 新手上路
UID: 2599
精华: 0
发帖: 9
金钱: 90 两
威望: 81 点
综合积分: 18 分
注册时间: 2008-11-26
最后登录: 2010-01-23
1楼  发表于: 2009-06-14 09:10
????????????????????????
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-06-14 10:09
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."