Skip to content

Add a build flag to disable specific USART IRQ handlers defined in the core #2899

@Santynolo

Description

@Santynolo

Is your feature request/improvement related to a problem? Please describe.

Without a way to undefine specific USARTx_IRQHandlers defined in the core, custom implementations of USART while keeping Serial functionality in others is not possible.

Describe the solution you'd like

I would like an additional build flag like "HAL_DISABLE_USART2IRQHANDLER" to disable specific USARTx_IRQHandler functions that are defined in the core, so they can be defined in the user's code instead, while keeping other USARTx_IRQHandler definitions to be able to use HardwareSerial on them.

Additional context
Here's a photo of the USART2_IRQHandler. For example, i would like to disable this specific handler, so i can use my own definition in my code, to write a custom use case, and be able to leave USART1 as is, so i can use HardwareSerial to print messages to the monitor.

Image

Here is my suggested implementation: (I do not know if this will cause issues)

Image

Thanks. This could also be implemented in other IRQHandlers, for example to disable specific ADC IRQHandlers, without disabling the entire ADC arduino implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions