-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
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.
Here is my suggested implementation: (I do not know if this will cause issues)
Thanks. This could also be implemented in other IRQHandlers, for example to disable specific ADC IRQHandlers, without disabling the entire ADC arduino implementation.