Loading...
Searching...
No Matches
line-config.hpp
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* SPDX-FileCopyrightText: 2021-2022 Bartosz Golaszewski <brgl@bgdev.pl> */
#ifndef __LIBGPIOD_CXX_LINE_CONFIG_HPP__
#define __LIBGPIOD_CXX_LINE_CONFIG_HPP__
#if !defined(__LIBGPIOD_GPIOD_CXX_INSIDE__)
#error "Only gpiod.hpp can be included directly."
#endif
#include <map>
#include <memory>
namespace gpiod {
class chip;
class line_request;
class line_settings;
class line_config final
{
public:
line_config();
line_config(const line_config& other) = delete;
line_config(line_config&& other) noexcept;
~line_config();
line_config& operator=(line_config&& other) noexcept;
line_config& reset() noexcept;
line_config& add_line_settings(line::offset offset, const line_settings& settings);
line_config& add_line_settings(const line::offsets& offsets, const line_settings& settings);
line_config& set_output_values(const line::values& values);
::std::map<line::offset, line_settings> get_line_settings() const;
private:
struct impl;
::std::shared_ptr<impl> _m_priv;
line_config& operator=(const line_config& other);
friend line_request;
friend request_builder;
};
::std::ostream& operator<<(::std::ostream& out, const line_config& config);
} /* namespace gpiod */
#endif /* __LIBGPIOD_CXX_LINE_CONFIG_HPP__ */
gpiod::chip
Represents a GPIO chip.
Definition chip.hpp:37
gpiod::line_config
Contains a set of line config options used in line requests and reconfiguration.
Definition line-config.hpp:29
gpiod::line_config::line_config
line_config(line_config &&other) noexcept
Move constructor.
gpiod::line_config::reset
line_config & reset() noexcept
Reset the line config object.
gpiod::line_config::get_line_settings
::std::map< line::offset, line_settings > get_line_settings() const
Get a mapping of offsets to line settings stored by this object.
gpiod::line_config::add_line_settings
line_config & add_line_settings(line::offset offset, const line_settings &settings)
Add line settings for a single offset.
gpiod::line_config::line_config
line_config(const line_config &other)=delete
gpiod::line_config::line_config
line_config()
gpiod::line_config::operator=
line_config & operator=(line_config &&other) noexcept
Move assignment operator.
gpiod::line_config::set_output_values
line_config & set_output_values(const line::values &values)
Set output values for a number of lines.
gpiod::line_config::~line_config
~line_config()
gpiod::line_request
Stores the context of a set of requested GPIO lines.
Definition line-request.hpp:33
gpiod::line_settings
Stores GPIO line settings.
Definition line-settings.hpp:28
gpiod::line
Namespace containing various type definitions for GPIO lines.
Definition line.hpp:24
gpiod
Definition chip-info.hpp:18