Looks like we perform an initialization of a right, so if you remember the first step where we initialize
both Iran and the gender entrapment rate, so let's proceed to initialization of bugs.
So first, we need to include the day today.
So the driver, which consists of an EPA related to a GSI presenting it.
See you guys.
So we proceed and explore the container for Typekit, so we require a config structure.
We just copy a config structure and we like it to mean correct.
So this will be a pointer.
Let me just name this as a second pick.
We also require an instance.
So.
We'll just copy this.
And let me just name this as gas.
With this now we proceed and declared one function that could perform initialization of rigor and also
perform the required configuration, Rachel added, Just name this as gassy in it.
Right?
So this consists of all the configuration of a gassy as well as initialization.
Right now, if you go to a jsou driver, we first require to generate the config structure, right?
So here we have a function that will generate a config structure for us, so we just need to pass the
device.
And this will automatically generate the config structure.
Rachel Gassy config.
OK, this will be close to the clock config.
And here we need to add at the wayside.
So if you go to an experimental dot and look for a gassy.
Right.
So here you have all the information related to GST, right?
So let me just copy the device, Heidi, and add as an argument to a lookup quality, correct?
This.
Will generate in the config structure, which will be utilized in a CFD initialize along with the instance
structure and the address to perform an initialization on this written s32.
So let me just clarify that you do.
The variable name is status, right, and then here we need to pass three arguments.
First, one is an instance structure, which is innocuous.
Then the conflict structure, which is gassy config, OK.
And the last thing that we need to pass is the basic rate, which could be accessed from the config
structure itself.
Right.
So this complete the process of an initialization will just verify whether initialization of the GC
is successful or not great.
So we'll check whether status.
Is equals to excess taxes, and if that is the case, we could just mention gas and it is successful,
as we could mention Jack in every race.
So this complete the initialization of both benefited as well as the next step is to initialize and
enable an internal exception handler for our CPU, right?
So we go ahead and first perform an initialization of an exception handler.
OK, so all the functions related to an exception handler representing 19 underscore exception.
Not I try to fight will go in there.
And first we proceed to perform an initialization rate.
So here we have the function that will perform an initialization for us.
OK, so we'll just be copying this going ahead and then we'll be adding it to work great.
So this does not return anything.
And this also do not required any argument.
Great.
The next step is to specify.
The register had no right.
So if you go ahead, you have a registered handler where we will be recognizing the type of the interrupt,
OK, and the master in Japan.
So let me just go ahead and call this function.
OK.
So for us, the type of interrupt is an Iraqi right.
So you will be providing a macro for and I ask you, so we will go ahead and look for the microbe that
we have for Iraq.
So this is that Michael will just be copying this and then that will serve as the first document.
So this is the type of trip that we have then the master in Japan.
So before we provide the master handler, we need to perform a typecasting.
So this is an expected type.
So we'll just be copying this and then will be adding it over here, right?
Master handler will be the GI C master handler.
So we go to the GI C driver file and then this is an interrupt handler that we need to provide.
So we copy this and add this as a second argument to our register.
Finally, the third argument is the callback data.
Okay, so this is related to a GI.
So we will be adding the GI C instance, such as a callback.
All right, so am Percy Angus, right?
So this is how we specify the register, right?
Finally, we need to enable our exception handler, so we do have a function to do that.
So if you just go to an opening.
OK, so here we have a function that could be used to enable our exception handler, right?
So let's just copy this and I ignore here, right?
So this complete the stick to OK, where we.
Initially, as well as enable an exception, right then we need to recognize the type of individual
and a specific function that should be executed when we have an interest rate.
So to do that, all the functions are presented and filed, right?
So we have just the correct rate.
So that requires first argument as to structure the unique ID that we get and then they interrupt handler
for that specific interest rate.
So let just copy this.
Go to Hallowell or see.
OK, now remember, we have two independent tools of an interest rate.
So let me just add an instance of Jupiter's gassy.
Then the unique idea, they say, if you go to an X parameter right now, you could clearly see OK for.
Light switch.
OK, we have a victory, OK?
This is a unique idea, and for Burton also, we have a unique idea, right?
So that is what we required to specify.
So let me just go ahead and first copy the slide, actually.
OK, this will be adding more here, and then we need to specify the function, right, so we require
two functions.
OK, that will be executed when we have an interest.
So let me just go ahead and add.
So just before we declare all the conflicts structural instance, occur that aside and interrupt the
later slide.
OK, and this will be an interrupt handler when we have an event on a which similarly will declare one
more function, which will be executed when we have an event on a button, right?
So for us, it will just be copying this going ahead, and then we need to add it to work here.
So this again need to be typecast, so if you go to a jack.
So this required the format that will interrupt handlers that will just be copying this.
OK.
Add the parentheses and then we will be performing a type custom, right?
The last one is a callback for a GPIO like simple.
Very, we do not require any contract callback data, right?
So we'll just be adding a seat over here.
Or you could just go ahead and specify the instance structure of that specific instance of an IP, right?
So we are working on a slide switch.
So for a slight switch, we utilize an instance structure to B slide.
OK, so we'll just be adding ampersand like, OK, so you could give this concept.
You and your cesaris have whichever and took we are working on.
We'd just be adding the instance that you put that benefit, right?
Now, remember, we need to do this twice because we have an independent interface, so let me just
copy this and then we will be adding a unique ID for our button, right?
So if you go to an X parameter, so here we have an unique ID for our button, right?
So we'll be adding this over here.
So typecasting will be changing with a type of an interface.
So this will remain sim only.
We need to change the function that you need to execute when we have an interpreter, so we go ahead.
And this is the function that we want to execute when we have an interest rate will just be adding it
over here, right?
Then the callback data will be for a button, right?
So the instance that you fall button is.
BP and right, so that is what we are going out over here, right?
Once this is done now, we need to enable us situate.
Let's just go ahead and first enable the switch.
Number two, which allows Jack to accept the input data input from a source.
OK, and then we ought to be finding the drivers specific switching loops that we have that will allow
a better battery to send and interpret this right?
So if you go ahead to a GC fight, we have a enabled which will allow the GC to accept the entire request
from approve of it.
So they just go ahead and perform this for both those sources, right?
This required two argument, right?
First one is an instance structure and then the unique entropy idea.
So this will be for the light switch you'll we again need to do this for buttonholes, right?
The only difference when the unique IED that we have for about a year will be replacing the slide IED
with a button, right?
Right.
So this close this I switch to locate for the Intrepid.
Now we will be looking for the benefit of specific functions that are there to close the switch number
one that allows and very, very detailed and interrupt requests to see right.
So we go to GPIO, they fight right.
And here we have a global enabled.
We just required an instant structure.
So me, just go ahead and I take over here right for the light switch.
The instead structure is light and forward, and it is a great.
One more function is their energy piledriver, which we need to inhibit that is interrupting every right.
So this required intensive structure and the channel number, right, so we'll just be copying this
going ahead and then we need to add the instant structure, which is light.
OK, and since we are utilizing Channel one for Good Day this OK, we just need to find out the Channel
one must go if we go to watch GPIO.
OK, so here we have our channel one must great.
So we'll just be copying this going ahead and then they need to work right?
Similarly, we just need to do this for the buttonholes.
So this complete all the process, which include initialization of what you see and all the configuration
that you need to do right.
So only step that spending is to declare what should be done when we have.
Interest from promised light switch and into from our bottom hand, Rachel, here, the process will
be very similar, so let's just go ahead and walk around with a slight switch.
So first thing that we do as soon as we reach to an hanger is to disable an interface.
So we do not have any new requests that will be so many testing one, right?
So if you go ahead and.
Inside the GPO driver, so we have an interactive separate, so that is what we're going to call.
OK, then we will be solving any and then finally will be clearing up all the pending request and then
start accepting the new request.
So here we will be.
Calling an animal, right?
So this is what we're going to do.
OK, now this required two argument Rachel instance structure and the mosque, right?
So this is exactly similar to what we have here.
So we'll just be copying this and adding it here, right?
The only thing that we going to do when we have a slide.
Into promised light switches is to read the value from a switch and then send it on a console, right?
So we go ahead and if we have a discrete lead that could be used to read the value from a switch, OK
or from a pen.
And this returns you dirty to regulate.
You just copy this Naoki you 32 data read.
OK.
And then this will be first argument.
Is the light switch OK?
The second argument that we have for this function is to channel them right.
So we are utilizing a single channel.
And then this week you're going to send to somebody, just go ahead and mention the study to be with
two 0d.
And we have a data storing that data.
This completes the process that we need to execute.
OK, when we have an interview on a slightly similar thing, we need to do with the end button also.
So let it just go ahead and add the same logic over here.
Right?
The only difference is, instead of a slide, we going to add a button over here, right?
So they just go ahead and replace this with a button also.
And this with the button was right.
In both the cases, we are only utilizing a single channel.
And this also should be better.
They and this variable can be utilized in both the function because these have a local school.
OK, so this is not visible to slide and it and in fact the that you have a slight hand is not visible
to a button hanger, right?
What we are doing is we are reading the value that we have on a button.
We are storing it in Detroit and then we are sending it on the console, right?
So this completed our entire code, right?
So what we are doing, we are first disabling and interrupt so that we do not have any new request until
we solve an existing one.
OK.
Then we are performing a required algorithm that we want to do when we have an event that is reading
the value from a light switch and then sending it on a console, right?
Once this is done, we are clearing up the pending cue of an intro and then we are again enabling high
end to back rate.
So what is the system?
Now let me just go ahead and call all the initialization function in the main culprit.
So after an IT platform will be calling GPIO and it, this will perform an initialization of 5G plyometric,
but it will also be calling GC init over here.
OK, and then we'll just wait for it to happen, right?
So to perform this, we just need to add while.
And then, OK.
So this will allow us to wait until we have it right.
So this completes our application.
Yes.
Will just be verifying whether this floats.
As expected, we'll give you the push button.
We usually need to handle a scenario of a d balancing rate.
We haven't added any logic to do that well here, so we'll just be analyzing where the code works.
Fine or not.
Ailes will just be adding or the balancing logic, you know, button, right?
So let's just put it our entire project.
So here we are utilizing and and the instant sector, but we are declaring it over here and told you
just go ahead and add those all structures about the conscious state.
So we'll just be going ahead and again, rebuilding our application.
Great.
So now very successful, we will be getting our yearly fight.
Now we proceed.
To perform a debugging of right, so select an application.
Debug us launch on Larry.
So this will automatically programmer, I know they'll also switch our perspective from design to it.
We just need to connect our widest dominance to conflict.
And then we need to click on a resume button.
So let me just click on resume button.
So you could clearly see GPIO and it is successful.
OK, and it is also a success rate to distinguish between slides, which I think the push button we
could actually add and unique statement.
OK.
When we are sending a data on to open source, so here slide.
Switch Detroit.
OK, here we could just mention, of course.
Button data rate strategist again, rebuild our application project.
And once they finish select debugger configuration, you can click on this will again start the fresh
debug session.
Right now we have our write.
This terminal will just be clearing up the previous messages and then click on resume button, right?
So GPO and it is successful and and it is successful right now.
We'll just change the slide switch.
So as we change this light switch now, you will see the value reader.
So let me just turn off all this light switches, right?
So value created zero size 18 my life switch.
Now you could see, since I turn on them, is this.
The value right is a great.
So if I turn on the next light switch, the value red velvet, well, if I turn on the next week, I
will be 40.
And if I turn on the light switch, the value rate will be 50.
Similarly, if I try to change the pushbutton rate, it's just change the MSP push button, right?
So you would see it and then zero, right?
So the value that we are reading is correct, but here we are also reading zero because as I push button
change, the state will look that itself is registered as an event rate.
So when we apply enact UI so that basically read and high end when we release the switch that basically
lead to reading as you, right?
So this is no analogy and that is what is happening over here when we consider this light switch.
So that is lighting, right?
So as long as users do not use the state, it will stay in that state.
And for that reason, we will be finding as soon as we make it one, it will state one, right?
So that is what we call it enlarging.
And when we consider the push button, OK, so it is not enlarging.
So when we turn on this light push button logo or when we press push button, we are getting one and
that basically lead to a value of it.
And as soon as we release it, we are getting a value of C, right?
If you click on the next push button, the value rate is four.
And as we release the bush budget, we are getting a value of C.
Similarly, if I turn on the next two values do, and as I release the push button, the value that
I am getting is C right.
Similarly, the Elisabeth's, which I am getting a value of one, and when I release the push button,
I'm getting a value of right.
So this is how you handle multiple interrupt, OK?
From an independent I.