-
Notifications
You must be signed in to change notification settings - Fork 63
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
Implementation file for Uart and example code. #204
Conversation
Khalil,
|
With the way you are doing this, you can omit the |
fdf1aca
to
46f1167
Compare
- Moved color range from lowest red = 50 and highest necessary green to 90. - Precision has been moved to 1 decimal place. This should result in deltas less than .1% not be considered as coverage failures.
b5505d0
to
21ae6bc
Compare
Codecov Report
@@ Coverage Diff @@
## master #204 +/- ##
========================================
Coverage ? 84.9%
========================================
Files ? 43
Lines ? 2025
Branches ? 0
========================================
Hits ? 1719
Misses ? 306
Partials ? 0
Continue to review full report at Codecov.
|
Even though coveralls says you decreased coverage by 2.6%, I will still merge you code in because it drops the binary size considerable (~3kB I think). |
Were you able to properly verify that the code works on the board? |
Haven't been able to get the driver working yet. Will test more tomorrow. |
Figured out the issue. It mostly had to do with the fact that the UART0 pins were not correct. UART0 must be P0.2 and P0.3 since we need that for serial communication with host machine. Which means that the pin function bits were also off. After changing those and a few other things I got it to work. See master's version of "Jeremy-Chau-UART" and make those changes to your repo. Ignore the changes to Hyperload though. I will make those changes after this is merged in. |
I believe I got all the changes in this updated commit. Please let me know if I missed any. |
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.
Do not go make the pull requests idential. Do not delete uart0.hpp and uart2.hpp. Just make the changes you need to, to uart.hpp.
firmware/library/L1_Drivers/uart.hpp
Outdated
uint8_t receiver = 0; | ||
uint64_t timeout_time = Milliseconds() + timeout; | ||
uint64_t current_time = Milliseconds(); | ||
uint8_t timeout_receiver = uart_base_reg[channel_]->LSR & (1 << 0); |
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.
It isn't polling if you only check once.
1. Consolidated multiple look up tables for the pairs of pins and added enumerations to simplify the code. 2. Has the timeout feature implemented. 3. Changed pin to pin_ and port to port_ in pin.hpp and gpio.hpp files 4. Working on improving code coverage. The only line that doesn't work deals with checking the DLL.
I should be finished with the code. Just can't figure out why the DLL register is empty from the testing file. |
Implementation file for Uart and example code.