Implement a new method in the request_builder class that allows to set
output values at request-time by calling the set_output_values() method
of the internal line_config object.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Kent Gibson <warthog618@gmail.com>
*/
request_builder& add_line_settings(const line::offsets& offsets, const line_settings& settings);
+ /**
+ * @brief Set output values for a number of lines in the line config
+ * stored by this object.
+ * @param values Buffer containing the output values.
+ * @return Reference to self.
+ */
+ request_builder& set_output_values(const line::values& values);
+
/**
* @brief Make the line request.
* @return New line_request object.
return *this;
}
+GPIOD_CXX_API request_builder&
+request_builder::set_output_values(const line::values& values)
+{
+ this->_m_priv->line_cfg.set_output_values(values);
+
+ return *this;
+}
+
GPIOD_CXX_API line_request request_builder::do_request()
{
line_request_ptr request(::gpiod_chip_request_lines(