Clarify code by using different API function
Use gpiod_chip_open instead of gpiod_chip_open_by_name, and thus avoid having to remove "/dev/" prefix.
This commit is contained in:
parent
8d920d7ed0
commit
4ed3ff835c
|
|
@ -69,7 +69,7 @@ LibgpiodJtagBitbang::LibgpiodJtagBitbang(
|
|||
}
|
||||
}
|
||||
|
||||
_chip = gpiod_chip_open_by_name(chip_dev.substr(5).c_str());
|
||||
_chip = gpiod_chip_open(chip_dev.c_str());
|
||||
if (!_chip) {
|
||||
display("Unable to open gpio chip %s\n", chip_dev.c_str());
|
||||
throw std::runtime_error("Unable to open gpio chip\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue