16 #ifndef PSEN_SCAN_V2_STANDALONE_IO_STATE_CONVERSIONS_H
17 #define PSEN_SCAN_V2_STANDALONE_IO_STATE_CONVERSIONS_H
26 namespace data_conversion_layer
29 std::size_t byte_location,
30 std::size_t bit_location)
32 return {
static_cast<uint32_t
>(byte_location * 8 + bit_location),
34 pin_data.
input_state.at(byte_location).test(bit_location) };
38 std::size_t byte_location,
39 std::size_t bit_location)
41 return {
static_cast<uint32_t
>(byte_location * 8 + bit_location),
43 pin_data.
output_state.at(byte_location).test(bit_location) };
60 std::vector<PinState> pin_states;
63 for (std::size_t bit_n = 0; bit_n < 8; ++bit_n)
76 std::vector<PinState> pin_states;
79 for (std::size_t bit_n = 0; bit_n < 8; ++bit_n)
93 std::vector<PinState> pin_states;
94 for (std::size_t byte_n = 0; byte_n < new_state.
input_state.size(); ++byte_n)
96 for (std::size_t bit_n = 0; bit_n < 8; ++bit_n)
111 std::vector<PinState> pin_states;
112 for (std::size_t byte_n = 0; byte_n < new_state.
output_state.size(); ++byte_n)
114 for (std::size_t bit_n = 0; bit_n < 8; ++bit_n)
129 #endif // PSEN_SCAN_V2_STANDALONE_IO_STATE_CONVERSIONS_H