linux i2c 的通信函數i2c_transfer在什么情況下出現錯誤


問題: 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 */


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM