diff options
-rw-r--r-- | citadel/citadeld/aidl/android/hardware/citadel/ICitadeld.aidl | 3 | ||||
-rw-r--r-- | citadel/citadeld/main.cpp | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/citadel/citadeld/aidl/android/hardware/citadel/ICitadeld.aidl b/citadel/citadeld/aidl/android/hardware/citadel/ICitadeld.aidl index 2ca6884..199d916 100644 --- a/citadel/citadeld/aidl/android/hardware/citadel/ICitadeld.aidl +++ b/citadel/citadeld/aidl/android/hardware/citadel/ICitadeld.aidl @@ -28,6 +28,9 @@ interface ICitadeld { */ int callApp(int appId, int arg, in byte[] request, out byte[] response); + /** Reset Citadel by pulling the reset line. */ + boolean reset(); + /** Runs a series of checks to ensure the devices is present, connected and responsive. */ boolean checkDevice(); } diff --git a/citadel/citadeld/main.cpp b/citadel/citadeld/main.cpp index 375a66f..41b2e88 100644 --- a/citadel/citadeld/main.cpp +++ b/citadel/citadeld/main.cpp @@ -66,6 +66,12 @@ struct CitadelProxy : public BnCitadeld { return Status::ok(); } + Status reset(bool* const _aidl_return) override { + const nos_device& device = *_client.Device(); + *_aidl_return = (device.ops.reset(device.ctx) == 0); + return Status::ok(); + } + Status checkDevice(bool* const _aidl_return) override { LOG(INFO) << "Running citadel device checks..."; *_aidl_return = android::citadeld::CheckDevice(_client.Device()); |