-
Notifications
You must be signed in to change notification settings - Fork 8.2k
zio: Introduce hts221 humidity sensor #17921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add a new sensor device API called zio_dev along with supporting interface and implmentations needed to better encapsulate a large range of functionality typical sampled input/output (sensor and signal generator) type devices commonly provide. Every device has a set of channels and attributes associated with it. Channels may be attached to a fifo like interface (zio_buf) which provides a pollable mechanism for obtaining the raw channel data at a designated watermark level. Signed-off-by: Tom Burdick <[email protected]>
Provide a software only example driver and sample application which generates a left and right sine wave at CD quality bit width and rate. Signed-off-by: Tom Burdick <[email protected]>
Rather than providing the attribute values directly in get_attrs for zio devices and channels, provide descriptions of each attribute. This should allow a driver to map many attributes directly to registers or internalized struct members and avoid storing these values in a zio_variant which is confusing. Signed-off-by: Tom Burdick <[email protected]>
Update synth driver and sample to use attribute descriptions Signed-off-by: Tom Burdick <[email protected]>
Add placeholder and fix duplicated label to in docs to make ci happy Signed-off-by: Tom Burdick <[email protected]>
Adds device tree bindings and nodes for the ft5336 capacitive touch
sensor to the mimxrt10{50,60,64}_evk boards.
Signed-off-by: Maureen Helm <[email protected]>
Introduces a new zio driver for the ft5336 capacitive touch sensor. Signed-off-by: Maureen Helm <[email protected]>
Adds support for LittlevGL input devices using the new zio interface. This should ultimately be independent of the specific touch controller, however it is currently tied to the ft5336 due to the lack of an abstracted touch sensor data type. We also have not implemented gpio interrupts in the ft5336 driver and therefore rely on manual triggering, making the touch input appear a bit laggy in the gui. Signed-off-by: Maureen Helm <[email protected]>
Configures LittlevGL to use the ft5336 capacitive touch sensor input by
default on the mimxrt10{50,60,64}_evk boards.
Signed-off-by: Maureen Helm <[email protected]>
Enables the touch sensor input and adds a keyboard object to the LittlevGL sample application. This is a hack, do not merge! Signed-off-by: Maureen Helm <[email protected]>
Prior to this patch, zio only supported u32_t variants. Add support for wrapping and unwrapping u8_t variants so the ft5336 driver can implement a new u8_t attribute. Signed-off-by: Maureen Helm <[email protected]>
Adds a read/write device attribute to the ft5336 zio driver to runtime configure the number of touches to push to the fifo. The ft5336 hardware can support up to five simultaneous touches, but some applications like LittlevGL only use a single touch. Signed-off-by: Maureen Helm <[email protected]>
LittlevGL doesn't suport multitouch inputs, so use the zio attribute setter interface to configure the ft5336 driver to only push single touches to the zio fifo. Signed-off-by: Maureen Helm <[email protected]>
|
|
||
| source "drivers/zio/Kconfig" | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental extra blank line.
| add_subdirectory_ifdef(CONFIG_HP206C hp206c) | ||
| add_subdirectory_ifdef(CONFIG_HTS221 hts221) | ||
| # test hts221 from zio | ||
| #add_subdirectory_ifdef(CONFIG_HTS221 hts221) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover debugging?
|
|
||
| source "drivers/sensor/hts221/Kconfig" | ||
| # test hts221 from zio | ||
| #source "drivers/sensor/hts221/Kconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover debugging?
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant document separator (see #16913).
| type: compound | ||
| category: optional | ||
| generation: define, use-prop-name | ||
| ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant document separator (see #16913).
|
@avisconti Glad to see another driver being written against this API, the current API I believe needs more refinement and I began working on that in another PR. I would love feedback on the API as it stands here from you as you've now written a driver for it. I'd also love to get feedback on what I think is a simpler version of this idea in this pull request I think topic sensors needs to be rebased anyways, I'll see if I can do it or if I can find someone to do it for me. Then I can take a closer look at this |
|
@avisconti |
Yes, sure. Thanks! |
depends on #16119
Prepare HTS221 driver based on zio interface.
This sensor component does not have an internal hardware FIFO. Nevertheless
I defined a s/w fifo of length==1. I will try later on with other sensors with h/w fifo.
In order to test it on the x_nucleo_shield3 is rebased on master and not topic-sensors.
I can later switch it if needed