aboutsummaryrefslogtreecommitdiff
path: root/client/peripheral_manager_client_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/peripheral_manager_client_impl.cc')
-rw-r--r--client/peripheral_manager_client_impl.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/client/peripheral_manager_client_impl.cc b/client/peripheral_manager_client_impl.cc
index 407a40f..4fdb731 100644
--- a/client/peripheral_manager_client_impl.cc
+++ b/client/peripheral_manager_client_impl.cc
@@ -86,3 +86,17 @@ int PeripheralManagerClientImpl::OpenI2cDevice(
int PeripheralManagerClientImpl::ListI2cBuses(std::vector<std::string>* buses) {
return client_->ListI2cBuses(buses).serviceSpecificErrorCode();
}
+
+int PeripheralManagerClientImpl::OpenUartDevice(
+ const std::string& name, std::unique_ptr<UartDeviceImpl>* device) {
+ Status status = client_->OpenUartDevice(name);
+ if (status.isOk()) {
+ device->reset(new UartDeviceImpl(name, client_));
+ }
+ return status.serviceSpecificErrorCode();
+}
+
+int PeripheralManagerClientImpl::ListUartDevices(
+ std::vector<std::string>* list) {
+ return client_->ListUartDevices(list).serviceSpecificErrorCode();
+}