问题: linux i2c 的通信函数i2c_transfer在什么情况下出现错误
描述:

linux i2c设备驱动

本人在写i2c设备驱动的时候使用i2c transfer函数进行通信的时候无法进行读写,返回值函数是-11,这个返回值是什么意思,

 


解决方案1:

参考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 */

相关文章:

  • 2021-09-12
  • 2021-09-02
  • 2022-03-10
  • 2022-03-02
  • 2022-01-08
  • 2021-12-10
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
相关资源
相似解决方案