Previously, the ST7796 driver required the board to pass a struct st7796_config_s at initialization time, carrying display resolution, color depth, orientation (MADCTL), BGR flag, SPI frequency, and initial rotation. All of these are chip-level properties, not board wiring details. This created an awkward split: board code computed MADCTL values, selected BPP, and derived effective resolution depending on orientation (knowledge that belongs exclusively in the generic driver). This commit removes that split entirely, following the same pattern used by the ST7789 driver in drivers/lcd/Kconfig. It also implements the getpower/setpower interface for standard framebuffer power management. What was changed (per file): drivers/lcd/Kconfig: - Added a full 'if LCD_ST7796' ... 'endif # LCD_ST7796' block containing all chip-level configuration. - Includes LCD_ST7796_XRES/YRES, LCD_ST7796_BPP, LCD_ST7796_FREQUENCY, LCD_ST7796_SPIMODE, LCD_ST7796_BGR, LCD_ST7796_INVCOLOR, and orientation/rotation choices. drivers/lcd/st7796.c: - Removed struct st7796_config_s from struct st7796_dev_s. - Moved struct st7796_cmd_s from public header to Private Types. - Added compile-time macros derived from Kconfig: ST7796_XRES/YRES (swapped for landscape), ST7796_MADCTL_BASE, ST7796_SPIMODE, ST7796_BYTESPP, ST7796_COLORFMT. - Implemented st7796_getpower() and st7796_setpower() using the st7796_board_power() board callback. - Registered power functions in st7796_fbinitialize() vtable. - Updated st7796_init_display() to make INVON/INVOFF conditional on CONFIG_LCD_ST7796_INVCOLOR. - Simplified st7796_fbinitialize() signature to only take 'struct spi_dev_s *spi'. include/nuttx/lcd/st7796.h: - Removed legacy macros (ST7796_XRES_RAW, etc.) and configuration structures. - Updated st7796_fbinitialize() prototype. - Added st7796_board_power() callback prototype. - Removed private implementation details from the public header. boards/arm/stm32h7/nucleo-h753zi/Kconfig: - Removed chip-level menus (settings, orientation) now handled by the generic driver. - Retained only board-specific wiring concerns (pins and SPI bus). boards/.../stm32_st7796.c: - Removed g_st7796_config and associated board-side macros. - Updated st7796_fbinitialize() call to the new signature. - stm32_st7796_flush_fb() now queries effective resolution via g_fb_vtable->getvideoinfo(). Verified on nucleo-h753zi: Orientation: Landscape (480x320), Rotation: 180 deg, BGR: enabled, INVCOLOR: disabled, BPP: RGB565, Frequency: 40 MHz. Making INVCOLOR a Kconfig option (default n) fixes cases where panels previously showed inverted colors due to hardcoded INVON. Signed-off-by: vrmay23 <vmay.sweden@gmail.com>
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.
