feat/stm32: NemaGFX (Neochrom GPU) basic screen-drawing support - #6626
Draft
leftger wants to merge 19 commits into
Draft
feat/stm32: NemaGFX (Neochrom GPU) basic screen-drawing support#6626leftger wants to merge 19 commits into
leftger wants to merge 19 commits into
Conversation
Introduce embassy-stm32-neochrom as the Embassy integration layer over stm32-bindings NemaGFX FFI, with chip presets, GPU2D stub bring-up, and a minimal NeoChrom clear API.
Wire embassy-stm32-neochrom into the N6 examples with a minimal GPU clear loop so local bring-up can validate linking and the command-list path.
on_interrupt() was a no-op, unlike every other peripheral driver in this crate. Give it the standard pattern used elsewhere (e.g. jpeg.rs): mask at the NVIC level (CLC/ER have no separate interrupt-enable field per gpu2d_v1.yaml, so there's nothing finer-grained to disable) and wake a static AtomicWaker. Add Gpu2d::wait_command_list_complete() as the async counterpart, re-arming the interrupt once the flag is consumed.
Adds gpu2d_bridge, implementing the C ABI hal_gpu2d_shim.h expects (HAL_GPU2D_ReadRegister/WriteRegister/PollCompletion) backed by embassy_stm32::gpu2d::Gpu2d instead of the CI-only stub. NeoChrom::new() splits into a stub-gpu2d variant (unchanged) and a real variant that takes the GPU2D peripheral + IRQ binding and constructs the real driver. Verified against STM32U5F9/U5G9, where the driver builds end-to-end. STM32N6/H7RS remain on the stub path for now — stm32-data is missing the RCC clock-enable/reset mapping for GPU2D on those chip families (present for U5 only), which embassy-stm32's Gpu2d driver requires regardless of this bridge. Only command-list-complete/error status is bridged; HAL_GPU2D_ReadRegister/ WriteRegister return 0/no-op for anything else, and hardware SystemError is drained without surfacing through NeoChrom::Error yet.
…_rect_fit, and blit_rotate
…PU2D hardware acceleration APIs
…missing local path The embedded-graphics integration commit pointed embedded-graphics-core at a nonexistent ../../embedded-graphics/core path, which broke dependency resolution for the whole crate regardless of enabled features.
|
This pull request is a draft, so it isn't in the review queue yet. Mark it as ready for review when you'd like someone to look at it. |
…nd expose Icache::invalidate Adds cache coherency handling and a dedicated GPU2D command module for the NeoChrom driver, extends FrameBuffer with ExternalFrameBuffer/GpuSurface, and exposes a standalone icache invalidate() usable without an Icache driver instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is merely a draft PR until I figure out how
stm32-bindingswill generate the NemaGFX driver bindings that this proposed crate addition will then make use of. The intent is the following:A set of examples is provided with stub driver initialization and a basic screen-drawing example.