Two defects keep the driver from reporting touches on a board that cannot use the interrupt line. The register write built two messages joined by I2C_M_NOSTART. That puts the same bytes on the wire as a single three byte message, but resuming a transfer without a start condition is optional, and a controller that does not implement it fails the transfer. On the ESP32-P4 every write returned -ETIMEDOUT, so the buffer status clear at 0x814E never reached the controller and gt9xx_read_touch_data() returned an error for every read. Send the register address and the value as a single message. read() returned a full struct touch_sample_s even when the controller reported no contact, with npoints set to zero. A caller that judges the read by its return value takes that for valid data: the LVGL touchscreen driver reads a second sample to decide whether to keep reading, always gets one, so it sets continue_reading on every pass and lv_indev_read() never returns. The display then stops refreshing after the first frame while the touch reads spin. Return -EAGAIN when there is no contact and the file was opened with O_NONBLOCK, which is what the touchscreen upper half does in the same situation. A blocking reader keeps the previous behaviour. While here, add the blank line after the declaration in gt9xx_poll() that nxstyle asks for. It predates this change, but the CI runs checkpatch over every file a commit touches, so it has to go. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com> |
||
|---|---|---|
| .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.