commit | 019d21db821ee4ae6dd3858174a0a5cee4d33c25 | [log] [tgz] |
---|---|---|
author | Andreas Huber <andih@google.com> | Mon Oct 03 12:59:47 2016 -0700 |
committer | Andreas Huber <andih@google.com> | Wed Oct 05 11:18:05 2016 -0700 |
tree | 3cf9254a0999ecd029c4b412ef829280e87a6156 | |
parent | 803764f9451504994e8b582f69df90e992c6954b [diff] |
Yet another backend for hidl-gen, this one generates a C-compatible header file containing those enum types annotated in the package like so: @export enum Foo { ... }; Optionally, the name to be used for the type declaration in the header file can be different from that used in the .hal interface description by specifying @export(name="foo_t") enum Foo { ... }; Finally, overriding the name to be empty, i.e. @export(name="") enum Foo { ... }; will cause the generator to emit an anonymous enum. Bug: 31800672 Change-Id: Idffb2c1700af1c7fd312941d80c3373add8ae558 Test: make
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: hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0