ARM11-Linux2.6-Button-Driver-Base-info-1
2011-11-02 19:26
471 查看
readb(),readw(),readl()几个函数的区别联系:
功能:
从内存映射的I/O空间读取数据。
1、readb()从I/O读取8位数据(1字节);
2、readw()从I/O读取16位数据(2字节);
3、readl()从 I/O 读取 32 位数据(4字节).
原型:
#include <asm/io.h>
unsigned char readb (unsigned int addr )
unsigned char readw (unsigned int addr )
unsigned char readl (unsigned int addr )
变量:
addrI/O地址
返回值:
从I/O空间读取的数值
功能:
从内存映射的I/O空间读取数据。
1、readb()从I/O读取8位数据(1字节);
2、readw()从I/O读取16位数据(2字节);
3、readl()从 I/O 读取 32 位数据(4字节).
原型:
#include <asm/io.h>
unsigned char readb (unsigned int addr )
unsigned char readw (unsigned int addr )
unsigned char readl (unsigned int addr )
变量:
addrI/O地址
返回值:
从I/O空间读取的数值
相关文章推荐
- ARM11-Linux2.6-Button-Driver-Base-info
- linux 输入子系统(3) button platform driver
- DMA Test Driver for Linux2.6.xx+ARM9
- linux2.6内核SD Card Driver详细解析之一
- 从串口驱动的移植看linux2.6内核中的驱动模型 platform device & platform driver
- Touch Screen Driver for Linux2.6.xx+ARM9
- linux2.6内核SD Card Driver详细解析之一
- linux2.6内核SD Card Driver详细解析之一
- 基于S3C2410平台USB Host Driver for Linux 2.6移植
- 从串口驱动的移植看linux2.6内核中的驱动模型 platform device & platform driver【转】
- IIC Device(At24c02) Driver for Linux2.6.xx+ARM9
- Linux 2.6下的platform_driver和platform_device(结合G870加密磁头驱动分析)
- linux2.6内核SD Card Driver详细解析之一
- driver: linux2.6 内核模块导出函数实例(EXPORT_SYMBOL)
- driver: linux2.6 内核模块导出函数实例(EXPORT_SYMBOL)
- driver: linux2.6 内核模块导出函数实例(EXPORT_SYMBOL)
- Writing a Linux device driver module for kernels 2.6 or later with udev
- LCD Driver Test for Linux2.6.xx+ARM9
- Writing a Linux device driver module for kernels 3.0 or 2.6 with udev
- LCD Driver for Linux2.6.xx+ARM9