Commit Graph

134 Commits

Author SHA1 Message Date
Alin Jerpelea 0a17b87286 graphics: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-10 22:54:31 +08:00
chao an 664927c86e mm/alloc: remove all unnecessary cast for alloc
Fix the minor style issue and remove unnecessary cast

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
Gustavo Henrique Nihei e6b204f438 nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Petro Karashchenko b107e4f417 nuttx: unify MIN, MAX and ABS macro definition across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-12-21 09:31:28 +08:00
yinshengkai 85f727f232 tools: replace INCDIR to Makefile variable
In the past, header file paths were generated by the incdir command
Now they are generated by concatenating environment variables

In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
Xiang Xiao d7f96003cf Don't include debug.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Alin Jerpelea 8366a20be8 graphics: Author: Gregory Nutt: update licenses to Apache
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-07 11:09:03 -03:00
Alin Jerpelea f177951c39 graphics: fix nxstyle errors
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-07 11:09:03 -03:00
Huang Qi fd78f83e02 drivers/video: Refine the update region notification mechanism
1.Expose the notification through fb_vtable_s::updatearea
2.Incorporate old nx_notify_rectangle into the new updatearea callback
3.Migrate the calle of nx_notify_rectangle to fb_vtable_s::updatearea

Change-Id: Ia3d1f73e8757b2d381586d76ec6adc16c810018d
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-10 08:08:33 +02:00
Xiang Xiao 5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Gregory Nutt 5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
This reverts commit b9ace36fcc.

This change was added by PR 625 but has a serious logic flaw.  It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:

    else ifeq ($(WINTOOL),y)
      DEFINE = "$(TOPDIR)/tools/define.sh"
      INCDIR = "$(TOPDIR)/tools/incdir.sh" -w

This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined.  As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
2020-03-26 08:50:29 -07:00
Xiang Xiao b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -06:00
Xiang Xiao cde88cabcc Run codespell -w with the latest dictonary again
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-02-23 22:27:46 +01:00
Xiang Xiao bd4e8e19d3 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Juha Niskanen ebc6f51641 Fix some typos 2019-09-17 10:46:23 -06:00
Gregory Nutt 5a41056a2f graphics/nxbe/nxbe_raise.c: Fix a critical list handling bug in the grahics system. When a lower-level window was raised while a model window was in place, then list corruption could occur. 2019-05-23 09:12:57 -06:00
Gregory Nutt a40ef12895 graphics/: Fix an oversight in the implementation of per-window framebuffers. It is true that redraw callbacks can be supporessed for all cases ... EXCEPT ONE: When the window is resized to a larger size, then the newly exposed territory must be drawn for the first time. 2019-05-16 09:18:33 -06:00
Gregory Nutt 3874f468de graphics/nxbe/nxbe_getrectangle.c: Fix an error in coordinate system usage. Expected rectangle in device coordinate frame, but was passing the rectangle in window-relative coordinate frame. 2019-05-10 09:18:17 -06:00
Gregory Nutt 8cc0d2fc15 graphics/nxbe/nxbe_setvisibility.c: Fix a missed redraw command in last NX visibility changes. 2019-05-06 12:04:48 -06:00
Gregory Nutt da314276a1 NX graphics: This commit adds support for hiding windows. This features is needed by Twm4Nx: When a window is iconfied, the icon should appear on the background and the window should disappear (i.e., be hidden). The windows needs to remain healthy and to be updated in all ways, but it cannot affect the display content.
Converserely, when the icon is clicked, the icon needs to be hidden on the backgound and the window needs to be restored in its current state (which may be different than the state of the window at the time it was iconified.

Squashed commit of the following:

    graphics/:  Add checks in all places that I can think to avoid doing something stupid with hidden windows

    Improve some naming

    Add a new file missing in last commit.

    graphics/:  Initial, incomplete support for hiding windows.
2019-05-05 15:21:52 -06:00
Gregory Nutt 4179b8416f graphics/: Clean up some C and Kconfig comments. Remove Kconfig dependency on EXPERIMENTAL. 2019-04-13 16:54:55 -06:00
Gregory Nutt c4f618e590 graphics/nxbe: This seems to fix the last of software cursor bugs. On the LPC54, it looks pretty clean. Not flickery as I feared. Probably not so good on low end displays. Possible transient artifacts? Not sure, maybe. Or maybe my eyes are playing tricks froom staring at this too long. 2019-04-13 15:08:32 -06:00
Gregory Nutt 099d9f94f4 graphics/nxbe: More work cursor coordinates. Still at least one big bug in the logic. 2019-04-13 10:13:00 -06:00
Gregory Nutt 39db179e1b graphics/nxbe/nxbe_cursor.c: Fix some garbage debug changes that snuck in with the last commit. 2019-04-11 10:40:18 -06:00
Ramtin Amin e74e46aa7f arch/arm/src/stm32f7/stm32_otgdev.c: Correct hardcoded FIFO size that is wrong for OTG FS. 2019-04-11 10:37:40 -06:00
Gregory Nutt b91b2cafd0 graphics/nxbe: Fix more cursor-related problems. Currently cursor is presented but the system dies due to memory corruption. 2019-04-10 14:59:43 -06:00
Gregory Nutt ad76ca674b graphics/nxbe: Some bugfix found early in cursor testing. 2019-04-10 12:31:43 -06:00
Gregory Nutt e514402c28 graphics/nxbe: Add some missing checks: Don't permit the software cursor to be enabled until it has been assigned an image; don't perform any cursor operations while the cursor is disabled. 2019-04-10 07:27:43 -06:00
Gregory Nutt cbb09c55ec graphics/nxbe and nxmu: This bring the software cursor to code complete. Still untested. Some flicker is expected. It has not been determined if that level of flicker is acceptable or not. 2019-04-09 15:09:10 -06:00
Gregory Nutt 4aadcc8c28 Adds support for cursors with differing pixel depths on multiple displays
Squashed commit of the following:

    Update .gitignore
    Fix some compile-related issues.
    Add support for cursors of differing pixeldepth.
    Various compile-related fixes.
    graphics/nxglib:  Separate cursor rendering routines in nxglib/ (like all other rendering logic).  graphics/nxbe:  Flesh out remaining cursor methods.
2019-04-09 11:33:59 -06:00
Gregory Nutt 0a6bb6e614 grahics/nxglib/nxglib.h: Move internal function prototypes from include/nuttx/nx/nxglib.h to graphics/nxglib/nxglib.h. 2019-04-08 17:14:41 -06:00
Gregory Nutt 9121f44dce graphics/nxbe: Correct some experimental cursor drawing algorithms. This logic is experimental and not yet in use. 2019-04-08 08:32:33 -06:00
Gregory Nutt 2c2729521b Abandon attempt to get common data structures for NX and the raw framebuffer cursor interface. This backs out several changes. 2019-04-07 18:00:40 -06:00
Gregory Nutt e5c56aaab6 graphics: A little more progress with software cursors. 2019-04-07 16:04:21 -06:00
Gregory Nutt 79b83f0c05 graphics: Extend the definition of the cursor image structure. 2019-04-07 13:25:20 -06:00
Gregory Nutt 42e2c9139c Squashed commit of the following:
libs/libnx/nxme:  Add front-end, client, message handling needed for cursor support.  Still actual cursor logic yet, just message handling.

    graphics/nxmu and graphics/nxbe:  Add back-end message handling needed for cursor support.  No actual cursor logic yet, just message handling.
2019-04-06 14:34:56 -06:00
Gregory Nutt 0a57cf0b8a graphics/nxbe: Implement hooks that will eventually support software 'sprites', i.e., things like OSD functionality, a software cursor, selection rectangles, window resize preview, etc. 2019-04-05 15:06:59 -06:00
Gregory Nutt 0b3375cb78 graphics/, lib/libnx, include/nutt/nx: Add support for modal windows. 2019-04-05 08:24:46 -06:00
Gregory Nutt 372e8b86a4 libs/libnx/nxmu/nx_filltrapezoid.c: Fix a coordinate system error. When no clipping rectangle is falls, it falls back to use the entire window as for the clip. However, that window must then then be in window relative coordinates, not in absoute device coordinates. 2019-03-20 12:26:45 -06:00
Gregory Nutt 10b73fde9d graphics/: Correct logic for copy of bit maps with resolution less than 8 bits from the per-window framebuffer to the device. 2019-03-18 09:45:09 -06:00
Gregory Nutt 92554257b9 Squashed commit of the following:
graphics/nxbe/nxbe_bitmap.c:  Fix another coordinate system problem.

    graphics/:  Review use of device coordinate system with window frambebuffer and make fixes accordingly.

    graphics/nxbe/nxbe_fill.c:  Fix a coordinate system bug.  Was trying to update the window fraembuffer using the device coordinate system.  Need to use the relative coordinate system.

    graphics/:  Use DEBUGASSERT instead of return an error since the is no user to handle the errors within the NX server.  Use CONFIG_DEBUG_GRAPHICS instead of CONFIG_DEBUG_FEATURES in most cases.

    graphics/:  Nothing under graphics/ should set the errno.
2019-03-17 11:34:45 -06:00
Gregory Nutt 18d52ecee2 app/graphics/nxbe/nxbe_setsize.c: Fix backward source/destination in memcpy() in new per-window framebuffer logic. 2019-03-16 17:37:29 -06:00
Gregory Nutt 56c7b65094 configs/open1788/pwfb: Add an example for testing per-window frame buffers. arch/arm/src/lpc17xx: Add a configuration option to skip over the framebuffer when adding DRAM to the heap. graphics: Early fixes from testing per-window framebuffer. Still lots of problems. 2019-03-16 12:31:29 -06:00
Gregory Nutt e5c0084804 graphics/nxbe/nxbe_move.c: Fix a compile error found in build testing. 2019-03-15 16:11:39 -06:00
Gregory Nutt 9fa8c69e0e graphics/: Fix some errors found test last per-window framebuffer logic (without framebuffers). 2019-03-15 14:50:54 -06:00
Gregory Nutt 9a97eb0fcf This commit brings the per-framebuffer logic to code-complete. Still untested.
Squashed commit of the following:

    Update TODO list

    graphics/nxbe:  The moverectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The filltrapezond renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe:  The getrectangle method now returns data from the per-window framebuffer if available.

    graphics/nxbe:  The fillrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxmu:  If a window supports a per-window framebuffer, then redraw callbacks are suppressed and the device content is updated from the shadow, per-window framebuffer.  graphics/nxbe:  The copyrectangle renderer now supports updates to the per-window framebuffer (unclipped) as well as the graphics device memory (clipped).

    graphics/nxbe/nxbe_setsize.c:  Reallocate the per-window framebuffer when the window size changes.
2019-03-15 12:15:33 -06:00