mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 09:59:03 +02:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user