-
Notifications
You must be signed in to change notification settings - Fork 1
15 ecu stm32 implement buzzer driver #29
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
base: main
Are you sure you want to change the base?
Conversation
AksonovSergei
left a comment
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.
Please fix my comments before the next meeting. If you can't, I will help you.
KPI_Rover/Buzzer/driver.c
Outdated
| return errors; | ||
| } | ||
|
|
||
| unsigned int Buzzer_Pulse(const unsigned int on_time_ms, const unsigned int period_time_ms, const unsigned int total_active_time_ms) |
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.
This is a blocking function. If you call it with total_active_time_ms = 5000, it will block the thread that calls it for 5 seconds.
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.
One more test case from Gemini:
Test Case: Disabling an Active Buzzer
Objective
Verify that the buzzer stops immediately when Buzzer_Disable() is called, even if the Buzzer_Pulse() function is still active.
Steps
Call the Buzzer_Pulse() function with a long duration, for example, total_active_time_ms = 5000.
Wait a short time (e.g., 500 milliseconds) to confirm the buzzer is on.
Call the Buzzer_Disable() function.
Expected Result
The buzzer should turn off right after Buzzer_Disable() is called. The Buzzer_Pulse() function's 5-second timer should be ignored. The device should be silent.
No description provided.