CH59x UART1 printf and uartdemo example #563
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This example does
printf
on UART1 (rx,tx:PA8,PA9).I #defined SetupUART like was done for ch32..., but I suspect that
_write
andputchar
should be overloaded because ofWEAK
. I can change that easily if necessary.Tested and working awesomely:
Also there are a bit more #defines in ch59xhw.h than necessary, but UART1 was mentioned in the interrupt from sleep stuff that I will be working on next so I included the whole sleep mode related #defines.