blob: a723461681f05249ad6bed4abae1c5c96e06ead4 [file] [log] [blame]
Patrick Venture1cde5f92018-11-07 08:26:47 -08001#include "lpc_handler.hpp"
2
3#include <cstdint>
Patrick Venture8c535332018-11-08 15:58:00 -08004#include <cstring>
Patrick Venture1cde5f92018-11-07 08:26:47 -08005#include <vector>
6
7namespace blobs
8{
9
Patrick Venture0d2a8132018-11-09 11:34:21 -080010bool LpcDataHandler::open()
11{
12 /* For the ASPEED LPC CTRL driver, the ioctl is required to set up the
13 * window, with information from write() below.
14 */
15 return true;
16}
17
Patrick Venture1cde5f92018-11-07 08:26:47 -080018std::vector<std::uint8_t> LpcDataHandler::copyFrom(std::uint32_t length)
19{
20 /* TODO: implement this. */
21 return {};
22}
23
Patrick Venture8c535332018-11-08 15:58:00 -080024bool LpcDataHandler::write(const std::vector<std::uint8_t>& configuration)
25{
26 struct LpcRegion lpcRequest;
27
28 if (configuration.size() != sizeof(lpcRequest))
29 {
30 return false;
31 }
32
33 std::memcpy(&lpcRequest, configuration.data(), configuration.size());
34 /* TODO: Implement the call to the driver or aspeed lpc ctrl library to send
35 * ioctl.
36 */
37
38 return false;
39}
40
41std::vector<std::uint8_t> LpcDataHandler::read()
42{
43 return {};
44}
45
Patrick Venture1cde5f92018-11-07 08:26:47 -080046} // namespace blobs