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> |
||
|---|---|---|
| .github | ||
| arch | ||
| audio | ||
| binfmt | ||
| boards | ||
| cmake | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| dummy | ||
| fs | ||
| graphics | ||
| include | ||
| libs | ||
| mm | ||
| net | ||
| openamp | ||
| pass1 | ||
| sched | ||
| syscall | ||
| tools | ||
| video | ||
| wireless | ||
| .asf.yaml | ||
| .codespell-ignore-lines | ||
| .codespellrc | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmessage | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| AUTHORS | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| INVIOLABLES.md | ||
| Kconfig | ||
| LICENSE | ||
| Makefile | ||
| NOTICE | ||
| README.md | ||
| ReleaseNotes | ||
Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).
For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.
Getting Started
First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.
Documentation
You can find the current NuttX documentation on the Documentation Page.
Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.
The old NuttX documentation is still available in the Apache wiki.
Supported Boards
NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.
Contributing
If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.
License
The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.