-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Raspberry Pi3 Uart #496
Conversation
hal/raspi3.c
Outdated
} while(*UART0_FR & 0x10); | ||
/* read it and return */ | ||
c = (char)(*UART0_DR); | ||
/* convert carrige return to newline */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling: carriage. Is this conversion really required?
hal/raspi3.c
Outdated
uint32_t len = sz; | ||
|
||
while (len > 0 && *buf) { | ||
/* convert newline to carrige return + newline */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling, plus conversion from CR to CR+LF, that should be handled by the caller, or left as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Agree. Carriage return code should be handled by the caller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good addition. Thanks! Just left a couple of comments on the spelling of "carriage" in "carriage return". In the same context, I'm wondering if these uart API should not handle the CR to CR+LF conversion at all.
Add use case on Raspberry Pi 3 B+ HW