Question: As written, Listing 4 is considered a blocking function, i . e . , it won't return until the delay as expired. However, Dr .
As written, Listing is considered a "blocking" function, ie it won't return until the delay as expired. However, Dr J would now like you to create a "nonblocking" hardwareassisted delay using the Core Timer and static variables as needed to implement the following behavior:
a The first time the routine is called, it sets an internal variable to to indicate that a delay is in progress, saves other information as well, and returns a to show a delay operation is in progress.
b Subsequent calls to the delay routine will check to determine if the delay has elapsed and if so return Otherwise, it returns a
A sample application is below
main
nonblockdelay; Initial call
whilenonblockdelay
task;
task;
end while
end main
The above will cause task and task to be executed repeatedly for at least msec.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
