| commit | edf054273fec04302c5346afd91c905aa082fb0d | [log] [tgz] |
|---|---|---|
| author | George Burgess IV <[email protected]> | Tue Nov 05 21:20:37 2024 |
| committer | Copybara-Service <[email protected]> | Thu Nov 07 15:48:21 2024 |
| tree | 2f63421a6ab5a9b9735af0644b50e2891e4df034 | |
| parent | cc24c51de327453d97a1fc931a59f0b20708fba8 [diff] |
libmems: IncludeBraces LSC
This removes the IncludeBraces workaround from .clang-tidy in this
project, and runs `cros format` to bring files in line with
Chromium's new style.
For more information on this LSC, see go/cros-insert-braces-lsc.
To reproduce _just_ this CL, inside of the chroot, run:
$ ${toolchain_utils}/py/bin/llvm_tools/insert_braces.py \
--start-project=libmems \
-n 1 \
--platform2-commit=d0f72ba10e3ba8d5068bb6e3460f9fa9b4f693ac
To reproduce the stack this was a part of, you can run the same
command, but with `--start-project` set to libhwsec and
-n set to 5.
BUG=b:370478040
TEST=CQ
Change-Id: I41a2c3366ef14d0af9ac4dba7dadac68f4b5e119
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/5995096
Owners-Override: Hidehiko Abe <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Tested-by: George Burgess <[email protected]>
Commit-Queue: George Burgess <[email protected]>
NOKEYCHECK=True
GitOrigin-RevId: ad345347c6a9c27e2b9e507ddd22eff13fd52313
Project goal and motivationThis library provides a set of wrapper and test helpers around libiio.
It is meant to provide a common foundation for Chrome OS to access and interface IIO sensors, with:
At the root of the hierarchy, there exists the IioContext, which represents the IIO devices currently available on the system. These can be retrieved by name and inspected, via instances of IioDevice.
An IioDevice allows reading and writing attributes of an IIO device via type-safe helper APIs. It also offers support for configuring the buffer and trigger of an IIO device, which we use in order to allow the Chrome UI to read accelerometer data and support screen rotation.
An IioDevice also exposes a list of IioChannels, which can individually be enabled and disabled.
Useful mocks for the core classes are provided, such that a test author can focus on the logic of the unit tests and share a common testing language with other engineers working in this space. Sharing the foundation of testing IIO sensor access helps ensure that any improvement in this area can benefit all clients.