nuttx/Documentation/components/drivers
Justin Hammond 769862ac6a sensors/tmp112: Add a uORB interface.
The TMP112 driver was character mode only, and carried the warning that
says so: a read returns a bare float, at a size the driver chose, and
nothing but code written for this one part can make sense of it.

Add the sensor framework version beside it, in the shape the tree
already uses for a part that has both.  The old driver is untouched and
still builds by default; the new one replaces it when
SENSORS_TMP112_UORB is set, and the part then appears as a temperature
topic that the common sensor tools can read without knowing what a
TMP112 is.

It reads on the low priority work queue at whatever interval the caller
asks for.  The part converts continuously out of reset, so nothing is
configured and the temperature register always holds the last completed
conversion: a reading is one bus transaction with nothing to wait for.
Reading faster than the part converts repeats a value, which costs bus
traffic and nothing else, so the interval is taken as given: the upper
half treats a lower half that hands back a longer interval than it was
given as a failed request, so clamping here would refuse a fast caller
rather than serve it slowly.

get_info reports what the part is and what its readings mean, so a
consumer need not know it is talking to a TMP112 to know the range and
the resolution.

It also sign extends the reading.  The register holds twelve bits, and
the character mode driver treats them as unsigned, so anything below
freezing comes back as a large positive temperature; the part is
specified down to -40C.  Fixing that in the old driver would change what
existing callers see, so it is fixed here, where there are no callers
yet to surprise.

This driver also covers the TMP102, which differs in accuracy rather
than in its registers: only the two both parts have are touched.

Documented under the sensors section, beside the other parts with a page
of their own, and listed among the uORB drivers.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-08-18 10:35:28 -03:00
..
block drivers/eeprom: Retrieve the geometry 2025-11-13 08:57:52 -03:00
character drivers/analog: add digital potentiometer driver support 2026-08-08 18:37:08 +08:00
special sensors/tmp112: Add a uORB interface. 2026-08-18 10:35:28 -03:00
thermal sim/thermal: Exercise the devfreq cooling path. 2026-08-18 09:46:47 -03:00
index.rst Documentation/virtio: add VirtIO framework documentation 2026-01-28 13:09:19 -03:00