Patrick Venture | e3e0f97 | 2018-12-19 08:58:21 -0800 | [diff] [blame] | 1 | #include "gpio_mock.hpp" |
| 2 | |
| 3 | #include <memory> |
| 4 | #include <string> |
| 5 | |
| 6 | // Set this before each test that hits a call to getEnv(). |
| 7 | GpioHandleInterface* gpioIntf; |
| 8 | |
| 9 | namespace gpio |
| 10 | { |
| 11 | |
Patrick Williams | 94539af | 2025-02-01 08:22:58 -0500 | [diff] [blame] | 12 | std::unique_ptr<gpioplus::HandleInterface> BuildGpioHandle( |
| 13 | const std::string& gpiochip, const std::string& line) |
Patrick Venture | e3e0f97 | 2018-12-19 08:58:21 -0800 | [diff] [blame] | 14 | { |
| 15 | return (gpioIntf) ? gpioIntf->build(gpiochip, line) : nullptr; |
| 16 | } |
| 17 | |
| 18 | } // namespace gpio |