Let us try to understand the application.
So first, we will be including all the mandatory flights.
So if you go to a board support package, right, so the driver which is recommended for any time,
arrives steamer.
Right.
And that is what we include.
First, so harsh, including ex TMR City are not.
So this is a driver file for our USA be.
We also included experimental flights, so that gives us an access to all the hardware related information,
right?
So two other driver file that we require for Intrpt handling is the exception which perform initialization
and enabling an internal exception handler for our CPU and all the gas related functions will be present
in the next yoga.
So first, we proceed with an initialization of timer rate.
So if you just explore the driver file, right, so you have CMG initialize and lookup config then present,
you also have an initialized function rate, so any of the material would prefer to perform an initialization,
right?
So here we prefer to perform an initialization utilizing extreme procedure at initialized we'll give,
which just required to have an instance structure.
And that is what we declare the order here.
So we declare an instance structure, OK?
And then we have one function that will perform an initialization of a timer, right?
So this is the step one that we are performing where we initialize our benefit and then we proceed for
initialization of what you see, right?
So we declared once studious, does variable.
OK, and this status will be quest to extend my S.T.A.R. initialize.
So get this required an instance structure and the device added to device I like would be found out
from the parameter attachment rate.
So this function will perform an initialization of our timer IP and then it will return the status of
initialization rate.
We will be use to check whether initialization is successful or not.
Great save status is equal to access to success.
We'll just mention that timer and it's successful as we will just be adding a timer next, right?
So this is how we perform an initialization of the exciting variety.
Now you could follow the second method also that is you declared an instance structure of config structure
call lookup config to generate the config structure and then quality of initialized rate admitted that
we also know so you could also utilize that method if you want great.
Because we do have a look up config and see if you initialize all right.
The next step is to perform an initialization of a gas.
Right.
So for example, we do not have anything as a initialize, so we need to declare the conflict structure
as well as an instance structure, right?
So here we declare config structure for radius and an instance structure for AGC, right?
Then we call lookup config where we pass the device.
80.
Right.
So this will need the config structure for us and then we will be utilizing this config structure.
OK, along with that, instead structuring the base address to perform an initialization right to this
function, CFD initialize basically return the studios of an initialization, which we are storing in
SD.
This variable life status is equal to exist.
Isakson's will then be mentioning GC and it is successful LS.
We can mention GC unity, right?
So this complete the process of initialization of proof that as well as a GC right now will be considered
a bit.
Or you could actually perform a configuration of the peripheral in the init function itself.
Right.
So here all the time and configuration could be done here.
It's set right.
So what we could do is to we could go ahead and calculate the delay.
Now we know that our dimer is operating at 50 megahertz frequency right to.
You need the delay of two seconds since our IXI dimer maybe operates at 50 Maiga, so we need to first
calculate the time periods of time.
Period will be when divide by 50 megahertz, right?
So three and three, so five and then seven zero, right?
So this is 50 megahertz.
We need to first cancel it out.
So here we have full spectrum, which is 50 integrated.
It's just exciting to get the delay of two.
Again, we just need to multiply by two, right?
We also need to enable the internet were great.
So we take this count variable, OK, and we go to our time worrying information will to it here, right?
And this will be a reset value for our time.
Right.
So we just need to call set reset value function, OK, and that will automatically.
Configure a timer to generate the delay of two second rate, then we need to also set up the correct
more great so two of working in operate mode, we need to include this option, right?
And we also want our timer to operate in a mode.
So this new option should be offered, OK, and then we use a set option to set this option to any side
timer, right?
This is what we gonna.
And in a time where in so these are only the configuration that we need to do for our time right now,
we could remove all this configuration from here, right?
So section could be removed and this could also be great.
So we just need to start our timer when we call our main application right.
So in retirement, we are performing an initialization.
We are also setting up the required count value for the relay that user is targeting, and we also have
correctly set up the website.
So to enable and interpret what we need to enable this option by ordering it with the existing option
that we have and then use the set option rate.
So this is the method that we've been using from the very beginning of the course, right?
We are also considering the down ground option, OK, because we want to upgrade our time worrying about
right now we go to a gas.
OK, so we already discuss how we perform an initialization.
Now we need to enable our exception handler, right?
So we need to, first of all, exception and this will perform an exception handler initialization.
Then in the register handler, we need to specify the type of an upgrade.
So for us, it is I, Eric, you, the master handler will be gassy interrupt handler.
And the last thing that we need to specify is the callback data.
And this will be the instance structure, right?
Finally, we need to enable an exception rate.
So this is exactly what we've been doing from the start of this section.
Rick, then we need to specify the function, which will serve as an interest handler for us, right?
So whenever we have an intercom, a timer will get, we need to specify which should be the function
that processes should be executing, right?
So we call the connect.
Here we need to add an incident structure, the unique IED that we get for timer.
OK, so if you just explore the parameter each fight and look for the so you get the MRC director idea,
right?
So this is a unique idea that we get for our timer into.
OK.
And that is what we're going to specify over here.
We also need to specify the function that will be executing when we have an interpreter from this victory.
Right?
So yeah, we declare a function calls SDMI Triangle, OK, and that is what we need to execute when
we have an interpreter.
So for a callback data, as we discussed in a previous case, you could just invoke the instance structure
of the paper.
And so for us, the dimer instance structure is steamer, and that is what we are considering for callback
data.
Right?
Well, this is done.
The next step is to enable this which is right tool to enable.
This switch.
OK, we need to just call Jack never again, that is what we are calling.
And then you need to parse this do argument instance structure and the unique idea right now if you
explore the.
OK, so we do not have anything as.
Interrupt, enable our global inquiry, so we do have something as an entertainer, but we do not have
anything as the internet enabled or.
The global interrupting Ebola, in that case, we could simply ignore that great, so we just need to
do this and then we are ready to cooperate.
So whenever you find a peripheral with the global injecting Ebola in and interrupting it, but you need
to attack as you could simply skip that step, right?
So by default, we will assume that this which is close.
So when this is done, we go to declared our demand, right?
So this will be the function that is that will be executed when we have an interpreter straight.
So a once we enter into a function now, since we do not have anything as in disable are clear, interpret,
twist or anything like that, OK, as we have in an GPO, here we are just verifying whether timer is
really expired and to know that we have a function call as a.m. is expired, right where we need to
specify an instance actually in the MRC den number.
So if that is if the timer is really expired.
OK, so we are just sending interest on to a council, right, and then we are calling a reset great.
So like we are calling reset is because our counter will again be re initialized to provide the delay
of second.
And then this way we could generate the multiple event rate.
So this is what we need to do when we do not have anything else interest, disable or clearing traps,
duties and so on and so forth, right?
So we just need to perform across.
And then we need to.
Come out of our entertainment, right, so that is what we are doing over here.
We are checking whether interest is expired or not.
Then we are sending the string on to a console.
OK, so this is an algorithm that we are planning and then we are again resetting.
Our counter says that it will be loaded with the count that provide us the delay of two second rate
since the now here we are not utilizing it all to reload more rate if we have utilized an auto reload
mode.
In that case, we do not need to perform this reset, right?
So this completes that entire code.
OK, when we go to a mean application first, we call it that one.
Does this consist of a code that help us to work around with the console without doing any configuration?
Then we are calling the function that will perform initialization of a timer.
OK, then we are calling the function that will perform initialization of a GC with all the configuration.
And then we are starting our timer, right?
So this will be continuously generating anyway at an interval of two seconds.
And since we are working in an indirect mode, so we just add while one OK and doing nothing, Auggie,
we are just waiting for an input to happen.
So this company's actually just built our application code.
And ones are very successful, right, so we will be.
Relaunching our debug session.
OK, so here we are, all really connected our way, this terminal to come.
The only thing that we need to do is to click on this resume button, right?
So you could see timer and it is successful and it is successful.
So at an interval of two second, now you could observe that we are getting the event through all my
time, right?
So there's either side of event that we get at an interval of two seconds.