Patrick Venture | b28f432 | 2018-09-14 10:19:14 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <gpioplus/handle.hpp> |
Patrick Williams | e8771fd | 2023-05-10 07:51:06 -0500 | [diff] [blame] | 4 | |
Patrick Venture | b28f432 | 2018-09-14 10:19:14 -0700 | [diff] [blame] | 5 | #include <memory> |
| 6 | #include <string> |
| 7 | |
| 8 | namespace gpio |
| 9 | { |
| 10 | |
| 11 | /** |
| 12 | * Method called to validate inputs and create a GpioHandle. |
| 13 | * |
| 14 | * @param[in] gpiochip - gpiochip id as string, e.g. "0", or "1" |
| 15 | * @param[in] line - gpio line offset as string. |
Patrick Venture | e3e0f97 | 2018-12-19 08:58:21 -0800 | [diff] [blame] | 16 | * @return A gpioplus::HandleInterface on success nullptr on failure. |
Patrick Venture | b28f432 | 2018-09-14 10:19:14 -0700 | [diff] [blame] | 17 | */ |
Patrick Venture | e3e0f97 | 2018-12-19 08:58:21 -0800 | [diff] [blame] | 18 | std::unique_ptr<gpioplus::HandleInterface> |
| 19 | BuildGpioHandle(const std::string& gpiochip, const std::string& line); |
Patrick Venture | b28f432 | 2018-09-14 10:19:14 -0700 | [diff] [blame] | 20 | |
| 21 | } // namespace gpio |