/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* SPDX-FileCopyrightText: 2021 Bartosz Golaszewski */ /** * @file misc.hpp */ #ifndef __LIBGPIOD_CXX_MISC_HPP__ #define __LIBGPIOD_CXX_MISC_HPP__ #if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__) #error "Only gpiod.hpp can be included directly." #endif #include namespace gpiod { /** * @brief Check if the file pointed to by path is a GPIO chip character device. * @param path Path to check. * @return True if the file exists and is a GPIO chip character device or a * symbolic link to it. */ bool is_gpiochip_device(const ::std::filesystem::path& path); /** * @brief Get the human readable version string for libgpiod API * @return String containing the library version. */ const ::std::string& api_version(); } /* namespace gpiod */ #endif /* __LIBGPIOD_CXX_MISC_HPP__ */