linux i2c 返回值意义


写i2c设备驱动的时候使用i2c transfer函数进行通信的时候无法进行读写,返回值函数有何含义:

在 include/uapi/asm-generic/errno-base.h 

#define	EPERM	 1	/* Operation not permitted */
#define	ENOENT	 2	/* No such file or directory */
#define	ESRCH	 3	/* No such process */
#define	EINTR	 4	/* Interrupted system call */
#define	EIO	 5	/* I/O error */
#define	ENXIO	 6	/* No such device or address */
#define	E2BIG	 7	/* Argument list too long */
#define	ENOEXEC	 8	/* Exec format error */
#define	EBADF	 9	/* Bad file number */
#define	ECHILD	10	/* No child processes */
#define	EAGAIN	11	/* Try again */
#define	ENOMEM	12	/* Out of memory */
#define	EACCES	13	/* Permission denied */
#define	EFAULT	14	/* Bad address */
#define	ENOTBLK	15	/* Block device required */

版权所有丨如未注明,均为原创,转载请注明转自:https://whonee.net/what-about-linux-i2c-return-value.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注