mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 06:23:33 +08:00
Linux: I2C opens /dev/i2c-x
For now it uses the bus number as the id. Not sure how this should actually be mapped. Seems like the I2C devices come up in random order and have random id but that a specific device can be found in the /sys/bus/i2c interface. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -943,6 +943,10 @@ blinkm_main(int argc, char *argv[])
|
||||
|
||||
int x;
|
||||
|
||||
if (argc < 2) {
|
||||
blinkm_usage();
|
||||
return 1;
|
||||
}
|
||||
for (x = 1; x < argc; x++) {
|
||||
if (strcmp(argv[x], "-b") == 0 || strcmp(argv[x], "--bus") == 0) {
|
||||
if (argc > x + 1) {
|
||||
|
||||
Reference in New Issue
Block a user