firmware: add read/write configuration methods

A data handler may require the host-side client to read or write
configuration information.  Therefore, implement a method for
controlling this in the data handler object.

Change-Id: Id7f8ff54d90cece2e8751773a8696638c2a2ea77
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/lpc_handler.cpp b/lpc_handler.cpp
index acd58c8..94bc73d 100644
--- a/lpc_handler.cpp
+++ b/lpc_handler.cpp
@@ -1,6 +1,7 @@
 #include "lpc_handler.hpp"
 
 #include <cstdint>
+#include <cstring>
 #include <vector>
 
 namespace blobs
@@ -12,4 +13,26 @@
     return {};
 }
 
+bool LpcDataHandler::write(const std::vector<std::uint8_t>& configuration)
+{
+    struct LpcRegion lpcRequest;
+
+    if (configuration.size() != sizeof(lpcRequest))
+    {
+        return false;
+    }
+
+    std::memcpy(&lpcRequest, configuration.data(), configuration.size());
+    /* TODO: Implement the call to the driver or aspeed lpc ctrl library to send
+     * ioctl.
+     */
+
+    return false;
+}
+
+std::vector<std::uint8_t> LpcDataHandler::read()
+{
+    return {};
+}
+
 } // namespace blobs