blob: 924efe8c7273b70c847acd3bec500a8df7838595 [file] [log] [blame]
Patrick Ventureb28f4322018-09-14 10:19:14 -07001#pragma once
2
3#include <gpioplus/handle.hpp>
Patrick Williamse8771fd2023-05-10 07:51:06 -05004
Patrick Ventureb28f4322018-09-14 10:19:14 -07005#include <memory>
6#include <string>
7
8namespace 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 Venturee3e0f972018-12-19 08:58:21 -080016 * @return A gpioplus::HandleInterface on success nullptr on failure.
Patrick Ventureb28f4322018-09-14 10:19:14 -070017 */
Patrick Venturee3e0f972018-12-19 08:58:21 -080018std::unique_ptr<gpioplus::HandleInterface>
19 BuildGpioHandle(const std::string& gpiochip, const std::string& line);
Patrick Ventureb28f4322018-09-14 10:19:14 -070020
21} // namespace gpio