commit | 9a6da7a784bea068b1f3fc3758c9cfc785183693 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Fri Sep 15 16:21:24 2017 -0700 |
committer | Steven Moreland <smoreland@google.com> | Mon Sep 25 11:43:29 2017 -0700 |
tree | fbecc5bf15e6541b6170b75e3b7dc1bdfca6e660 | |
parent | 74214204ebc00cdbb7f7f91b1f6be554dd52a84a [diff] |
Add adapters for HIDL interfaces. An adapter for a HIDL interface takes an x.(y+1) interface and registers it as an x.y interface. This adds new autogenerated test libraries to HIDL which can be used to run tests. Test: can switch out implementations ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471 ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 7635 471 ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471 Test: build all adapters in hardware/interfaces Test: adapt @1.1::IPower to @1.0::IPower Test: NFC works even after having an adaption layer over it (@1.0 -> @1.0 :/) Bug: 37518178 Change-Id: Ia009d59352963321f16e085f034f70c462ccceeb
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0