26 lines
577 B
C++
26 lines
577 B
C++
#include <bsp_q7s/gpio/cookies/GpioCookie.h>
|
|
|
|
GpioCookie::GpioCookie() {
|
|
}
|
|
|
|
void GpioCookie::addGpio(GpioMap newEntry){
|
|
gpioMapIter = gpioMap.find(newEntry);
|
|
if(gpioMapIter == gpioMap.end()) {
|
|
std::pair status = gpioMap.emplace(newEntry);
|
|
if (status.second == false) {
|
|
sif::error << "GpioCookie::addGpio: Failed to add GPIO "
|
|
<< newEntry.first << "to GPIO map" << std::endl;
|
|
}
|
|
}
|
|
else {
|
|
sif::error << "GpioCookie::addGpio: GPIO already exists in GPIO map "
|
|
<< std::endl;
|
|
}
|
|
}
|
|
|
|
GpioMap getGpioMap() const{
|
|
return gpioMap;
|
|
}
|
|
|
|
GpioCookie::~GpioCookie() {}
|