-
Notifications
You must be signed in to change notification settings - Fork 3
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
[SOFT-999] Completed Firmware 102 homework, request for code review #488
base: master
Are you sure you want to change the base?
Conversation
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.
Looks really well done! There is a simpler design however, that uses only one timer callback function. See if you can figure it out, but if not feel free to ask for help
uint8_t counter_b; | ||
} Counters; | ||
|
||
void prv_timer_callback_2(SoftTimerId timer_id, void *context); |
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.
Don't worry about forward declaring your functions, just declare them where you write the function bodies.
This line can go
|
||
void prv_timer_callback_2(SoftTimerId timer_id, void *context); | ||
|
||
void prv_timer_callback(SoftTimerId timer_id, void *context) { |
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.
You can (and should) do all the soft-timer functionality in one timer callback function instead of 2, see if you can figure it out, but if not feel free to ask for help 🙂
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.
Additionally, all private functions in a file should be declared as static, ie static void prv_*
First test commit.