-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor uart #13585
base: master
Are you sure you want to change the base?
Refactor uart #13585
Commits on Apr 25, 2024
-
serial - refactor serial resource handling
- port related resources (tx/rx/inverted,dma) - are stored sequentially, with space in place of ports that are not enabled (RESOURCE_UART_COUNT + RESOURCE_LPUART_COUNT + RESOURCE_SOFTSERIAL_COUNT) - RESOURCE_UART_OFFSET, RESOURCE_LPUART_OFFSET, RESOURCE_SOFTSERIAL_OFFSET - resource entries are pointing into this array (UART, LPUART, SOFTSERIAL) - both pins and DMA - inverter is supproted only for UART + LPUART (makes sense only for UART, to be removed) - softSerialPinConfig is removed, it is no longer necessary - serialResourceIndex(identifier) is used universally to get correct index into resource array - unified handling of resources where possible - serialOwnerTxRx() + serialOwnerIndex() are used for displaying resources correctly to user. - serialType(identifier) implemented - serialOwnerTxRx / serialOwnerIndex are trivial with it - large switch() statemens are greatly simplified
Configuration menu - View commit details
-
Copy full SHA for 2b907fb - Browse repository at this point
Copy the full SHA 2b907fbView commit details -
serial - merge code duplicated in all UART implementations
- drivers/serial_uart_hw.c contains merged serialUART code. Code did not match exactly. Obvious cases are fixed, more complicated use #ifs - pin inversion unified - uartOpen is refactored a bit
Configuration menu - View commit details
-
Copy full SHA for f78b10c - Browse repository at this point
Copy the full SHA f78b10cView commit details -
- use 'compressed' enum from uartDeviceIdx_e. Only enabled ports are in this enum. - uartDeviceIdx directly indexes uartDevice (no search necessary, no wasted space) - use `serialPortIdentifier_e identifier;` for uartHardware - for DMA remap, define only entries for enabled ports (uartDeviceIdx_e does not exist disabled port)
Configuration menu - View commit details
-
Copy full SHA for 595b140 - Browse repository at this point
Copy the full SHA 595b140View commit details -
Configuration menu - View commit details
-
Copy full SHA for 343ed89 - Browse repository at this point
Copy the full SHA 343ed89View commit details -
serial - HAL - rxIrq, txIrq replaces by irqn
There is only one IRQ for serial
Configuration menu - View commit details
-
Copy full SHA for c962202 - Browse repository at this point
Copy the full SHA c962202View commit details -
Generated code to normalize target configuration. jinja2 template is used to generate header file. Port handling is unified a lot. SERIAL_<type><n>_USED 0/1 - always defined, value depends on target configuration SERIAL_<type>_MASK - bitmask of used ports or given type. <port>1 is BIT(0) SERIAL_<type>_COUNT - number of enabled ports of given type SERIAL_<type>_MAX - <index of highest used port> + 1, 0 when no port is enabled
Configuration menu - View commit details
-
Copy full SHA for fbb7dec - Browse repository at this point
Copy the full SHA fbb7decView commit details -
targets - remove automatically calculated valued from configs
serial_post.h generated it
Configuration menu - View commit details
-
Copy full SHA for 34d43b9 - Browse repository at this point
Copy the full SHA 34d43b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 462dd65 - Browse repository at this point
Copy the full SHA 462dd65View commit details -
serial - change LPUART to UART_LP1 in places
LPUART is mostly handled as another UART port, this change reflects it
Configuration menu - View commit details
-
Copy full SHA for 904ad98 - Browse repository at this point
Copy the full SHA 904ad98View commit details -
serial - use ARRAYLEN / ARRAYEND in some places
replaces constant that may not match actual array size
Configuration menu - View commit details
-
Copy full SHA for d842fd5 - Browse repository at this point
Copy the full SHA d842fd5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5114ae9 - Browse repository at this point
Copy the full SHA 5114ae9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90cdcd9 - Browse repository at this point
Copy the full SHA 90cdcd9View commit details -
Configuration menu - View commit details
-
Copy full SHA for fac6a13 - Browse repository at this point
Copy the full SHA fac6a13View commit details -
Configuration menu - View commit details
-
Copy full SHA for b430fa7 - Browse repository at this point
Copy the full SHA b430fa7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a822a09 - Browse repository at this point
Copy the full SHA a822a09View commit details -
Configuration menu - View commit details
-
Copy full SHA for a672e42 - Browse repository at this point
Copy the full SHA a672e42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92f7399 - Browse repository at this point
Copy the full SHA 92f7399View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb65300 - Browse repository at this point
Copy the full SHA eb65300View commit details -
include serial_post.h, some ports are defined, so normalization will work fine
Configuration menu - View commit details
-
Copy full SHA for e825d9a - Browse repository at this point
Copy the full SHA e825d9aView commit details
Commits on Apr 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a9ba3a4 - Browse repository at this point
Copy the full SHA a9ba3a4View commit details
Commits on May 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2af8488 - Browse repository at this point
Copy the full SHA 2af8488View commit details