![]() This means that for a polling approach like ours where we need to check on the button being pressed while time passes, a non-blocking approach is required. The code will keep returning to check (poll) the timer if the delay ended. Non-blocking on the other hand means allowing operations to resume and the controller can do other things meanwhile. Blocking means that the controller will sit idle (operations blocked) until the delay finishes. Let's incorporate these adjustments into the flow chart to see how it would look like now.ĭelay methods come in two forms, blocking and non-blocking. Here instead of updating a loop variable to check if it had reached the maximum value I instead poll a timer/counter and check if it reached the desired delay value. The application in this post adopts the same algorithmic approach as my previous post, however, with minor modifications. User button connected to pin PC13 on the microcontroller.LED is connected to pin PA5 on the microcontroller.On-board connections will be utilized and the include the following: ![]() There will be no need for external connections. Note that if the code on the git repo is slightly different then it means that it was modified to enhance the code quality or accommodate any HAL/Rust updates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |