Skip to content
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

Support for UART RX/TX level inversion on F3/F7 platforms #1160

Closed
pawelsky opened this issue Aug 31, 2020 · 1 comment
Closed

Support for UART RX/TX level inversion on F3/F7 platforms #1160

pawelsky opened this issue Aug 31, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@pawelsky
Copy link

Please add API in HardwareSerial class to enable/disable RX/TX level inversion for platforms that support it (e.g. F3 or F7)

This can be done e.g. by adding a inverse_logic parameter to the constructor (similarily to SoftwareSerial), and based on that configuring the AdvancedInit member of the UART_AdvFeatureInitTypeDef struct in uart_init function in the uart.c wrapper to something like:

    huart->AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT | UART_ADVFEATURE_RXINVERT_INIT;
    huart->AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE;
    huart->AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE;
@fpistm
Copy link
Member

fpistm commented Jun 11, 2021

Added to [U(S)ART] request list #1418

@fpistm fpistm closed this as completed Jun 11, 2021
@fpistm fpistm added enhancement New feature or request and removed Request labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants