用户态应用程序直接访问I2C驱动
#include "stdlib.h"
#include "string.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "fcntl.h"
#include "i2c-dev.h"
//调用来自“i2c-tools-3.1.0.tar.bz2”,包含操作I2C函数的声明
// i2c_usr_test r addr
//
void print_usage(char *file)
{
}
int main(int argc, char **argv)
{
}
评论