blob: cf01a0a5d1bc4ecfca583fc595cf8023b657da7a [file] [log] [blame]
Patrick Venturee3e0f972018-12-19 08:58:21 -08001#include "gpio_mock.hpp"
2
3#include <memory>
4#include <string>
5
6// Set this before each test that hits a call to getEnv().
7GpioHandleInterface* gpioIntf;
8
9namespace gpio
10{
11
12std::unique_ptr<gpioplus::HandleInterface>
13 BuildGpioHandle(const std::string& gpiochip, const std::string& line)
14{
15 return (gpioIntf) ? gpioIntf->build(gpiochip, line) : nullptr;
16}
17
18} // namespace gpio