| commit | 50073885bc00b6cf99e23a198f866791bff17973 | [log] [tgz] |
|---|---|---|
| author | Gwendal Grignou <[email protected]> | Fri Jan 10 08:25:51 2025 |
| committer | Copybara-Service <[email protected]> | Thu Feb 13 06:32:15 2025 |
| tree | 08a8eb3a6c1acc0db7011a2a5cfc41f31859f496 | |
| parent | edf054273fec04302c5346afd91c905aa082fb0d [diff] |
libmems: Fix includes order Fix includes errors found by cros format. BUG=none TEST=compile. Change-Id: If005d31c7d387ec11f6f6a7d809148c2e32ee5ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/6164339 Reviewed-by: Harvey Yang <[email protected]> Tested-by: Gwendal Grignou <[email protected]> Commit-Queue: Gwendal Grignou <[email protected]> NOKEYCHECK=True GitOrigin-RevId: 27ab06411e58531f7dc462492cd60c6bb4734d1d
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.