added back member iter
This commit is contained in:
parent
0045cd2062
commit
a8d2557545
@ -39,7 +39,6 @@ ReturnValue_t LinuxLibgpioIF::initialize(GpioCookie* gpioCookie){
|
||||
}
|
||||
|
||||
ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap& mapToAdd) {
|
||||
//GpioMapIter mapToAddIter;
|
||||
std::string chipname;
|
||||
unsigned int lineNum;
|
||||
struct gpiod_chip *chip;
|
||||
@ -48,9 +47,7 @@ ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap& mapToAdd) {
|
||||
struct gpiod_line *lineHandle;
|
||||
int result;
|
||||
|
||||
//mapToAddIter = mapToAdd->begin();
|
||||
for(auto& gpioConfig: mapToAdd) {
|
||||
//for (; mapToAddIter != mapToAdd->end(); mapToAddIter++) {
|
||||
chipname = gpioConfig.second.chipname;
|
||||
chip = gpiod_chip_open_by_name(chipname.c_str());
|
||||
if (!chip) {
|
||||
@ -119,7 +116,7 @@ ReturnValue_t LinuxLibgpioIF::driveGpio(gpioId_t gpioId,
|
||||
int result;
|
||||
struct gpiod_line *lineHandle;
|
||||
|
||||
auto gpioMapIter = gpioMap.find(gpioId);
|
||||
gpioMapIter = gpioMap.find(gpioId);
|
||||
if (gpioMapIter == gpioMap.end()){
|
||||
sif::debug << "LinuxLibgpioIF::driveGpio: Unknown gpio id " << gpioId << std::endl;
|
||||
return RETURN_FAILED;
|
||||
@ -139,7 +136,7 @@ ReturnValue_t LinuxLibgpioIF::driveGpio(gpioId_t gpioId,
|
||||
ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
|
||||
struct gpiod_line *lineHandle;
|
||||
|
||||
auto gpioMapIter = gpioMap.find(gpioId);
|
||||
gpioMapIter = gpioMap.find(gpioId);
|
||||
if (gpioMapIter == gpioMap.end()){
|
||||
sif::debug << "LinuxLibgpioIF::readGpio: Unknown gpio id " << gpioId << std::endl;
|
||||
return RETURN_FAILED;
|
||||
@ -153,7 +150,6 @@ ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
|
||||
|
||||
ReturnValue_t LinuxLibgpioIF::checkForConflicts(GpioMap& mapToAdd){
|
||||
gpioId_t gpioId;
|
||||
auto gpioMapIter = gpioMap.begin();
|
||||
for(auto& gpioConfig: mapToAdd) {
|
||||
gpioId = gpioConfig.first;
|
||||
/* Cross check with private map */
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
private:
|
||||
/* Holds the information and configuration of all used GPIOs */
|
||||
GpioMap gpioMap;
|
||||
GpioMapIter gpioMapIter;
|
||||
|
||||
/**
|
||||
* @brief This functions drives line of a GPIO specified by the GPIO ID.
|
||||
|
Loading…
x
Reference in New Issue
Block a user