-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
uart: refactor uart module to build async/await serial structure (#9)
* uart: refactor uart module to build async/await serial structure The original serial structures were renamed to `BlockingSerial`, `BlockingTransmitHalf` and `BlockingReceiveHalf`. The new `Serial` structure dedicates to async/await function. Serial constructors now returns error instead of panicking in the HAL crate. Examples are modified to unwrap the return value of the constructor. Ref: https://docs.embassy.dev/embassy-stm32/git/stm32f746ve/usart/struct.Uart.html#method.new The serial `uart` module is rearranged into files for clearance of code. * rt: introduce DspInterrupt structure which implements plic::InterruptSource Implement interrupt enable, initialize RISC-V interrupt in uart-async-demo example * example: enable interrupt using PLIC in uart-async-demo TODO: check if T-Head C906 PLIC is different from standard PLIC. If so, we'd contribute the non-standard PLIC into `xuantie` crate. * hal: uart: use freerun mode on AsyncSerial structure * rt: fix test error by using xuantie repository commit fe7ec712 --------- Signed-off-by: Zhouqi Jiang <luojia@hust.edu.cn>
Showing
26 changed files
with
2,373 additions
and
1,939 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.