msdk icon indicating copy to clipboard operation
msdk copied to clipboard

fix(PeriphDrivers): Fix UART DMA Callbacks for UART1+

Open Jake-Carter opened this issue 9 months ago • 1 comments

Description

Fixes #998

As the internal UART state struct was only initialized per used UART instance, attempting to use UART1 (or higher) with DMA auto handlers would never trigger the user's callback functions. The state struct's DMA channel values would be initialized to 0 instead of -1, which the drivers would assume was a valid channel acquisition.

This PR fixes the bug by initializing the UART state struct at run-time.

Checklist Before Requesting Review

  • [ ] PR Title follows correct guidelines.
  • [ ] Description of changes and all other relevant information.
  • [ ] (Optional) Link any related GitHub issues using a keyword
  • [ ] (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

Jake-Carter avatar Apr 29 '24 22:04 Jake-Carter