Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPi5 i2c interface initialized by wiringPiI2CSetup() #104

Open
NicolARun06 opened this issue Mar 21, 2024 · 0 comments
Open

OPi5 i2c interface initialized by wiringPiI2CSetup() #104

NicolARun06 opened this issue Mar 21, 2024 · 0 comments

Comments

@NicolARun06
Copy link

NicolARun06 commented Mar 21, 2024

HW:
OrangePi5, and its available I2C dev are: /dev/i2c-1, /dev/i2c-3, /dev/i2c-5.

OS:
Orangepi5_1.1.8_ubuntu_jammy_desktop_xfce_linux6.1.43
the operating system default i2c dev include: /dev/i2c-0 /dev/i2c-10 /dev/i2c-2 /dev/i2c-6 /dev/i2c-7 /dev/i2c-9

But, in wiringOP sources:

extern int wiringPiI2CSetup (const int devId) ;

device = "/dev/i2c-0" ;

`/*

  • wiringPiI2CSetup:
  • Open the I2C device, and regsiter the target device

*/

int wiringPiI2CSetup (const int devId)
{
int rev ;
const char *device ;
int model;

piBoardId(&model);

device = "/dev/i2c-0" ;

return wiringPiI2CSetupInterface (device, devId) ;

}`

The default I2C device used in code is i2c-0.

That means, this function wiringPiI2CSetup could be initialized successfully (WITHOUT open device failure) in any case, but it cannot obtain the valid register values...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant