return ret;
}
-const ::std::map<line::direction, gpiod_line_direction> direction_mapping = {
+const ::std::map<line::direction, ::gpiod_line_direction> direction_mapping = {
{ line::direction::AS_IS, GPIOD_LINE_DIRECTION_AS_IS },
{ line::direction::INPUT, GPIOD_LINE_DIRECTION_INPUT },
{ line::direction::OUTPUT, GPIOD_LINE_DIRECTION_OUTPUT },
};
-const ::std::map<gpiod_line_direction, line::direction>
+const ::std::map<::gpiod_line_direction, line::direction>
reverse_direction_mapping = make_reverse_maping(direction_mapping);
-const ::std::map<line::edge, gpiod_line_edge> edge_mapping = {
+const ::std::map<line::edge, ::gpiod_line_edge> edge_mapping = {
{ line::edge::NONE, GPIOD_LINE_EDGE_NONE },
{ line::edge::FALLING, GPIOD_LINE_EDGE_FALLING },
{ line::edge::RISING, GPIOD_LINE_EDGE_RISING },
{ line::edge::BOTH, GPIOD_LINE_EDGE_BOTH },
};
-const ::std::map<gpiod_line_edge, line::edge> reverse_edge_mapping = make_reverse_maping(edge_mapping);
+const ::std::map<::gpiod_line_edge, line::edge>
+reverse_edge_mapping = make_reverse_maping(edge_mapping);
-const ::std::map<line::bias, gpiod_line_bias> bias_mapping = {
+const ::std::map<line::bias, ::gpiod_line_bias> bias_mapping = {
{ line::bias::AS_IS, GPIOD_LINE_BIAS_AS_IS },
{ line::bias::DISABLED, GPIOD_LINE_BIAS_DISABLED },
{ line::bias::PULL_UP, GPIOD_LINE_BIAS_PULL_UP },
{ line::bias::PULL_DOWN, GPIOD_LINE_BIAS_PULL_DOWN },
};
-const ::std::map<gpiod_line_bias, line::bias> reverse_bias_mapping = make_reverse_maping(bias_mapping);
+const ::std::map<::gpiod_line_bias, line::bias>
+reverse_bias_mapping = make_reverse_maping(bias_mapping);
-const ::std::map<line::drive, gpiod_line_drive> drive_mapping = {
+const ::std::map<line::drive, ::gpiod_line_drive> drive_mapping = {
{ line::drive::PUSH_PULL, GPIOD_LINE_DRIVE_PUSH_PULL },
{ line::drive::OPEN_DRAIN, GPIOD_LINE_DRIVE_OPEN_DRAIN },
{ line::drive::OPEN_SOURCE, GPIOD_LINE_DRIVE_OPEN_SOURCE },
};
-const ::std::map<gpiod_line_drive, line::drive> reverse_drive_mapping = make_reverse_maping(drive_mapping);
+const ::std::map<::gpiod_line_drive, line::drive>
+reverse_drive_mapping = make_reverse_maping(drive_mapping);
-const ::std::map<line::clock, gpiod_line_clock> clock_mapping = {
+const ::std::map<line::clock, ::gpiod_line_clock> clock_mapping = {
{ line::clock::MONOTONIC, GPIOD_LINE_CLOCK_MONOTONIC },
{ line::clock::REALTIME, GPIOD_LINE_CLOCK_REALTIME },
{ line::clock::HTE, GPIOD_LINE_CLOCK_HTE },
};
-const ::std::map<gpiod_line_clock, line::clock>
+const ::std::map<::gpiod_line_clock, line::clock>
reverse_clock_mapping = make_reverse_maping(clock_mapping);
-const ::std::map<line::value, gpiod_line_value> value_mapping = {
+const ::std::map<line::value, ::gpiod_line_value> value_mapping = {
{ line::value::INACTIVE, GPIOD_LINE_VALUE_INACTIVE },
{ line::value::ACTIVE, GPIOD_LINE_VALUE_ACTIVE },
};
-const ::std::map<gpiod_line_value, line::value> reverse_value_mapping = make_reverse_maping(value_mapping);
+const ::std::map<::gpiod_line_value, line::value>
+reverse_value_mapping = make_reverse_maping(value_mapping);
line_settings_ptr make_line_settings()
{
GPIOD_CXX_API line_settings& line_settings::set_direction(line::direction direction)
{
- set_mapped_value<line::direction, gpiod_line_direction,
+ set_mapped_value<line::direction, ::gpiod_line_direction,
::gpiod_line_settings_set_direction>(this->_m_priv->settings.get(),
direction, direction_mapping);
GPIOD_CXX_API line::direction line_settings::direction() const
{
- return get_mapped_value<line::direction, gpiod_line_direction,
+ return get_mapped_value<line::direction, ::gpiod_line_direction,
::gpiod_line_settings_get_direction>(
this->_m_priv->settings.get(),
reverse_direction_mapping);
GPIOD_CXX_API line_settings& line_settings::set_edge_detection(line::edge edge)
{
- set_mapped_value<line::edge, gpiod_line_edge,
+ set_mapped_value<line::edge, ::gpiod_line_edge,
::gpiod_line_settings_set_edge_detection>(this->_m_priv->settings.get(),
edge, edge_mapping);
GPIOD_CXX_API line::edge line_settings::edge_detection() const
{
- return get_mapped_value<line::edge, gpiod_line_edge,
+ return get_mapped_value<line::edge, ::gpiod_line_edge,
::gpiod_line_settings_get_edge_detection>(
this->_m_priv->settings.get(),
reverse_edge_mapping);
GPIOD_CXX_API line_settings& line_settings::set_bias(line::bias bias)
{
- set_mapped_value<line::bias, gpiod_line_bias,
+ set_mapped_value<line::bias, ::gpiod_line_bias,
::gpiod_line_settings_set_bias>(this->_m_priv->settings.get(),
bias, bias_mapping);
GPIOD_CXX_API line::bias line_settings::bias() const
{
- return get_mapped_value<line::bias, gpiod_line_bias,
+ return get_mapped_value<line::bias, ::gpiod_line_bias,
::gpiod_line_settings_get_bias>(this->_m_priv->settings.get(),
reverse_bias_mapping);
}
GPIOD_CXX_API line_settings& line_settings::set_drive(line::drive drive)
{
- set_mapped_value<line::drive, gpiod_line_drive,
+ set_mapped_value<line::drive, ::gpiod_line_drive,
::gpiod_line_settings_set_drive>(this->_m_priv->settings.get(),
drive, drive_mapping);
GPIOD_CXX_API line::drive line_settings::drive() const
{
- return get_mapped_value<line::drive, gpiod_line_drive,
+ return get_mapped_value<line::drive, ::gpiod_line_drive,
::gpiod_line_settings_get_drive>(this->_m_priv->settings.get(),
reverse_drive_mapping);
}
GPIOD_CXX_API line_settings& line_settings::set_event_clock(line::clock event_clock)
{
- set_mapped_value<line::clock, gpiod_line_clock,
+ set_mapped_value<line::clock, ::gpiod_line_clock,
::gpiod_line_settings_set_event_clock>(this->_m_priv->settings.get(),
event_clock, clock_mapping);
GPIOD_CXX_API line::clock line_settings::event_clock() const
{
- return get_mapped_value<line::clock, gpiod_line_clock,
+ return get_mapped_value<line::clock, ::gpiod_line_clock,
::gpiod_line_settings_get_event_clock>(
this->_m_priv->settings.get(),
reverse_clock_mapping);
GPIOD_CXX_API line_settings& line_settings::set_output_value(line::value value)
{
- set_mapped_value<line::value, gpiod_line_value,
+ set_mapped_value<line::value, ::gpiod_line_value,
::gpiod_line_settings_set_output_value>(this->_m_priv->settings.get(),
value, value_mapping);
GPIOD_CXX_API line::value line_settings::output_value() const
{
- return get_mapped_value<line::value, gpiod_line_value,
+ return get_mapped_value<line::value, ::gpiod_line_value,
::gpiod_line_settings_get_output_value>(
this->_m_priv->settings.get(),
reverse_value_mapping);