So here I have already created a new wireless platform project where we invoked the excessive file that
we have created.
But then we to.
You need to follow the same procedure and then invoke the platform project.
Okay, considering the extensive file that we have generated.
And also, you need to create the application project where we will be invoking the Halliwell's template,
right?
Now, since we have a single IP, and again, we know that X AGP IP, the tribe required is an x GPI
0.8, so we have included that.
And we also included an experimental that's right.
The first step that we follow is to configure our benefit rate to that is initializing up 80 percent.
To do that, we require to structure first 22 config structure.
Then we required an instance structure, right?
So we follow the same procedure where we are calling a lookup config.
So where we fast the device idea that you generate the config structure, right?
So once we have our config structure, so we will be calling CFD initialize where we add instant structure,
config structure and the B side to.
Once you passed this three document to see if she initialize this will return the status of initialization.
Again, we are checking whether the status is equal.
Strix this is Texas.
If that is the case, we'll just be mentioning that device initialization is successful.
Else, we will simply be adding the device in ICSI.
Right.
So this is the similar process that people following the previous example right now we go ahead in a
mean code.
We are calling this function, which is in it right, and they need platform and clean up platform work,
predominantly with an upgrade to this handle all the initialization of a new lock and that we required
because we want to work with the consoles first step.
When we work with that, UPI o is to correctly configure the direction, right?
So if you remember, our first port is where we have our switches, right?
So this should be configured as an input.
Their second channel should be configured as it output, right?
So we go ahead.
And if you explore.
It's Dubai, right?
So here we have a function, do sector direction, right, so this is the function that is used to save
the leader direction here.
We need quite robust things, just structure the chain number and the direction that we want to set
correct as copy this.
Go back to our main quote.
OK, so the first channel is where we have our light switches, so we need to configure them to be input
groups or instance structure for us is truepill.
Then the China number one is where we have a suchith and we want to configure them to be an input.
So if you exclude the functionality of that data protection you sick and the pain as an input.
You need to apply what?
Right.
So we go ahead.
And we will add for once, right?
So Alice, before once will configure, are a little bit phobic to work as an input.
So we are 0x.
And so this basically means we're specifying a number and then hexadecimal format, and this is equivalent
to four binary one, right?
Similarly, Channel two is where we have our L3, right?
So this should be configured as an output.
So to do that, the process is again very simple.
We are going to need to call this function now here only difference.
We need to change the channel number of the China number, it's two and to configure this to be an output,
but we need to add a seat, right?
So this is how you correctly set up the direction.
Now why we have set setup the full, but only because we have only four slides, which are so if you
have the number of switches analytic Greta, then you need to set that many number objects to one or
zero, depending on the direction that you want to set, right?
So once detection is correctly set up now, we will be analyzing the function that will be used to read
the value from a pin, right?
So we have a discrete lead which returns you 32 and then where we need to specify instance structure
and the China number.
So we require to declare a variable of you 32 type that will be holding the switch rather than let it
just go ahead and declare you 32.
This will be switch.
Well, right.
And let me just initialize this to a zero.
Now we'll be continuously reading the value for all mod slopes, which is at an interval of two second
rate.
So to do that, let me just add sleep to at the end, right?
This allows us to read those light hedges at an interval of loose again and then that will be signing
on to an elite rate.
So switch value, OK, this will be equal to the function that we have to do.
That is discretely.
OK.
This required two argument.
First one is an instant structure, which is GPIO in hockey's right, and then we require to specify
the channel so the switches are at China.
But right to this allow us to read the value from the switches and then that value will be sending onto
an LCD, right?
So to do that, we have a discrete right.
Right here, we need to pass an instance structure, China number and value of the data that we want
to send to annually.
Right.
First one is an instance actuar, which is GPIO, the channel where we have our IT two and the value
that we want to send is switch value, right?
This makes sense.
We will also be sending this value on a console.
So as we change the value of the switches, we'll also be seeing the changes on the console, right?
So to do that, we have a printer that could be used to print a fixed point variable rate.
So.
Switch value read, OK.
But things again, do not forget to add a new line, correct?
OK, and the variable that is holding the value of a switches switch, right?
Right.
So what we are doing is we are reading the value from a switch, that value we are writing to and.
We are also sending that on to a console.
And this we are doing in developing second right.
So this computer application now this will be continuously running as we are, we are using a light,
right?
So once you finish your application, you just need to build up an entire application project.
Great.
So this will lead any file that will be executing on an FDA right to finish select an application project,
right click Debug as launch on hardware.
Right.
So once you switch your perspective to a DBA, the next thing that you need to do is to connect the
serial terminal right.
To click on this plus button, select the respect you can put on the border.
Click OK, right?
So once you see this, do this, just go ahead and click on resume.
But right, so you could see a device and it's successful.
So that is this is of our benefit initialization.
And right now you could observe all the switches are in.
And all right, so if I change and unless we switch to one OK or on studio could see the value rate
is gone right.
If I turn on the next switch, you'll be observing the value registry.
If I turn on, the next one will be getting seven.
And if I turn on the last one, you'll be getting the value of 50.
Right.
So this is how you could work around with a dual channel.
OK.
And you could also observe that simultaneously, depending on the switch status.
OK.
Are also turning on off, right?