Patrick Venture | 1cde5f9 | 2018-11-07 08:26:47 -0800 | [diff] [blame] | 1 | #include "lpc_handler.hpp" |
| 2 | |
| 3 | #include <cstdint> |
Patrick Venture | 8c53533 | 2018-11-08 15:58:00 -0800 | [diff] [blame^] | 4 | #include <cstring> |
Patrick Venture | 1cde5f9 | 2018-11-07 08:26:47 -0800 | [diff] [blame] | 5 | #include <vector> |
| 6 | |
| 7 | namespace blobs |
| 8 | { |
| 9 | |
| 10 | std::vector<std::uint8_t> LpcDataHandler::copyFrom(std::uint32_t length) |
| 11 | { |
| 12 | /* TODO: implement this. */ |
| 13 | return {}; |
| 14 | } |
| 15 | |
Patrick Venture | 8c53533 | 2018-11-08 15:58:00 -0800 | [diff] [blame^] | 16 | bool LpcDataHandler::write(const std::vector<std::uint8_t>& configuration) |
| 17 | { |
| 18 | struct LpcRegion lpcRequest; |
| 19 | |
| 20 | if (configuration.size() != sizeof(lpcRequest)) |
| 21 | { |
| 22 | return false; |
| 23 | } |
| 24 | |
| 25 | std::memcpy(&lpcRequest, configuration.data(), configuration.size()); |
| 26 | /* TODO: Implement the call to the driver or aspeed lpc ctrl library to send |
| 27 | * ioctl. |
| 28 | */ |
| 29 | |
| 30 | return false; |
| 31 | } |
| 32 | |
| 33 | std::vector<std::uint8_t> LpcDataHandler::read() |
| 34 | { |
| 35 | return {}; |
| 36 | } |
| 37 | |
Patrick Venture | 1cde5f9 | 2018-11-07 08:26:47 -0800 | [diff] [blame] | 38 | } // namespace blobs |