blob: f48a34d990bc947e9ff7d8cbc72e9e1ccf91f10d [file] [log] [blame]
Patrick Ventureb28f4322018-09-14 10:19:14 -07001#pragma once
2
3#include <gpioplus/handle.hpp>
4#include <memory>
5#include <string>
6
7namespace gpio
8{
9
10/**
11 * Method called to validate inputs and create a GpioHandle.
12 *
13 * @param[in] gpiochip - gpiochip id as string, e.g. "0", or "1"
14 * @param[in] line - gpio line offset as string.
Patrick Venturee3e0f972018-12-19 08:58:21 -080015 * @return A gpioplus::HandleInterface on success nullptr on failure.
Patrick Ventureb28f4322018-09-14 10:19:14 -070016 */
Patrick Venturee3e0f972018-12-19 08:58:21 -080017std::unique_ptr<gpioplus::HandleInterface>
18 BuildGpioHandle(const std::string& gpiochip, const std::string& line);
Patrick Ventureb28f4322018-09-14 10:19:14 -070019
20} // namespace gpio