Commit graph

19 commits

Author SHA1 Message Date
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Gerard Marull-Paretas acb0cd65ca drivers: display: ili9xxx: generalize ILI display driver
Make driver generic for multiple ILI displays. The adopted strategy is
to share all driver code except register initialization, which has been
found to have some specific registers/values depending on the
controller.

The driver has been adjusted to support multiple compatibles.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-11-10 15:52:12 -06:00
Gerard Marull-Paretas e807769dce drivers: display: ili9340: align register names
Align register names with the ones found in the datasheet. It is easier
to follow datasheet if names are the same.

Some other minor enhancements have also been introduced (comments, use
BIT for bit fields...).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-10-22 15:31:18 -05:00
Gerard Marull-Paretas cd68e5819f drivers: display: ili9340: remove old hardcoded configurations
Remove Adafruit/Seeed TFT hardcoded settings. Note that undocumented
ILI9340/1 settings have been removed (maybe Seeed is using another ILI
variant?).

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas afc63664f2 drivers: display: ili9340: move display function control to DT
Move display function control (DISCTRL) register settings to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas 6a76ae82c0 drivers: display: ili9340: move frame rate control register to DT
Move FRMCTR1 register settings to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas 4895620eb0 drivers: display: ili9340: move VCOM parameters to DT
Move VCOM control 1/2 register values to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas a1ce0c851d drivers: display: ili9340: move gamma parameters to DT
Move gamma curve and correction registers GAMSET, PGAMCTRL and NGAMCTRL
to DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas c02e50a09d drivers: display: ili9340: add support for pwctrl in DT
Add support for setting PWRCTRL1/2 registers via DT.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas 8593959ccf drivers: display: ili9340: add support for rotation
Add support for setting display rotation (0, 90, 180 and 270) using
DeviceTree.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas b406527a66 drivers: display: ili9340: code cleanup
Multiple enhancements towards better code readability and consistency:

- sorted headers
- define and reference magic constants
- adjust some names
- add U suffix to unsigned constants
- move hw reset to a function
- remove non-needed initialization code from seeed tft

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas 2d4ec8fca9 drivers: display: ili9340: improve error handling
Add error handling to multiple areas of the code and improve log
messages.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Gerard Marull-Paretas 26c3b99b55 drivers: display: ili9340: convert to multi-instance
Make ILI9340 driver compatible with multiple device instances.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-09-29 14:18:05 -05:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Bernard Lee 0744adf417 display: ili9340: Add support of Seeed 2.8" TFT Touch Shield v2.0.
Add support of Seeed 2.8" TFT Touch Shield v2.0 to ILI9340 driver.
This driver supports color pixel formats of RGB888 and RGB565.

Signed-off-by: Bernard Lee <bernard.lee@nordicsemi.no>
2019-05-30 09:39:07 -04:00
Jan Van Winkel d332ae5b6a driver: Updated ILI9340 driver to use display API
Updated ILI9340 display driver and sample application to make use off
the display API

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-10-03 11:29:00 -07:00
Flavio Ceolin 67ca176754 headers: Fix headers across the project
Any word started with underscore followed by and uppercase letter or a
second underscore is a reserved word according with C99.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-17 15:49:26 -04:00
Jan Van Winkel ca16779d9e driver: ILI9340 LCD display driver
Minimal driver for ILI9340 LCD display driver including support
for adafruit 2.2" LCD display (1480)

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2018-05-18 20:21:45 +03:00