Ch32v support#59
Merged
Merged
Conversation
… ChannelUart class
…dling; add tests for sendBuffer functionality
…MakeLists for test integration
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a shared UART framing implementation to the L4 C++ module and begins introducing platform-specific UART channels (incl. CH32V), while expanding the C L4 layer with new tests and an optional function-pointer based UART send hook.
Changes:
- Introduces
styxlib::ChannelUart+ChannelUartConfigand adds Catch2 tests validating framing (SOF/header/CRC). - Adds initial CH32V UART channel skeleton and refactors Pico
ChannelUsbUartheader toward the new base abstraction. - Extends the C L4 layer with Catch2 tests, adds optional UART send function-pointer plumbing, and renames the STM8 send function.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cpp/modules/l4/test/test_dummy.cpp | Removes placeholder dummy test. |
| cpp/modules/l4/test/test_ChannelUart.cpp | Adds tests for UART framing behavior (SOF/header/CRC). |
| cpp/modules/l4/src/uart/ChannelUart.cpp | Implements generic UART framing logic in ChannelUart::sendBuffer. |
| cpp/modules/l4/src/ch32v/ChannelCh32Uart.cpp | Adds CH32V UART channel skeleton. |
| cpp/modules/l4/include/uart/ChannelUart.h | Defines ChannelUart/ChannelUartConfig abstraction. |
| cpp/modules/l4/include/styxpico/ChannelUsbUart.h | Refactors Pico USB UART header to inherit ChannelUart. |
| cpp/modules/l4/include/ch32v/ChannelCh32Uart.h | Declares CH32V UART channel type. |
| cpp/modules/l4/CMakeLists.txt | Adds ChannelUart.cpp to module sources; adjusts test wiring. |
| cpp/CMakeLists.txt | Enables C language, adds platform options, fixes compile-definitions + subdir path. |
| c/l4/test/test_Channel_c.cpp | Adds C L4 Catch2 unit tests (CRC + config flags). |
| c/l4/src/ChannelUartStm8.c | Renames STM8 send function to v2styxlib_uart_stm8_send. |
| c/l4/include/ChannelUartStm8.h | Updates STM8 header to match renamed send function. |
| c/l4/include/Channel_c.h | Adds optional function-pointer UART send API + refactors types/docs. |
| c/l4/README.md | Adds a brief note about V2STYXLIB_USE_FUNCTIONS_POINTERS. |
| c/l4/CMakeLists.txt | Adds a Catch2-based test target for the C L4 module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…te related structures and tests
…or expected CRC16 frame
…pdate README, and modify source filtering
… modify setup function, and adjust send logic for SOF markers
…ructor to use baseConfig for SOF markers
…RT initialization using direct register manipulation
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.
No description provided.