So our generation is successful now, what are we going to do is we will be exporting our hardware.
This is the next step that we follow will also be including a bit strict, right?
And then we will be launching an SDK.
Now when we more IP.
OK, so here, if you remember, our peripheral IP had named according to their functions.
So whenever it is used to communicate with an elderly, we need it as an entity.
Similarly, when we use to communicate data from the Stooges, OK, we named it a switch, and this
really helps when we read experimentar.
Got it straight.
So remember, you need your IP according to a function, right?
So when we go to an SDK, first thing that we do is to utilize the Hallowell template, right?
So we'll just be naming this as stupa or multiple instances.
OK.
And then we will be invoking an halloway template.
Now, when we go to an EMRs file, you could see Diab's that we're required to utilize for Accept Israel
IP that we have at a rate so which we need to use GPIO.
And for a lily also, we need to use GPI right now.
You could really see that we distinguish an IP by giving a name for which we are utilizing that right.
So let me just go to a Hallowell Dot see and start developing our main application rate.
So here some of the mandatory header files.
They include so driver Ferrari say GPA is GPA.
So with just be adding x GPA, you don't h OK, this is the first to fail and the next one is which
will be serving as the file, which will be giving us data related to hardware x parameters.
Daughter trick will just be saving Al Gore, so this will automatically build up and then we will be
going to an x GPA right now here.
We will be having agenda to structure one for an instance, OK, another for our conflict.
So we have an x GPA, OK, which will be used to store all the data related to an instance of the IP.
OK.
And this will be adding for both Aliadiere, as well as such, because we have two independent instances
of an IP, right?
So we need to initialize both of them.
So x GPA first will be for an elderly and then there will be four switch rate will just be naming this
as at any instance and then switch and set it straight.
The next one will require two config structures for an independent IP, so we'll just be going ahead
and this will again be a pointer rate.
So it will be an entity config, OK?
And the next one that we have is for switch config.
Right now, we will create a function that could be used to initialize are both the IP that we have
added and not hypochlorite the white in it.
And then we will declare the one variable which will be storing the status, whether initialization
is successful or great.
The function that we have is first will be looking for a device ID.
So we have a function lookup config, correct, so that they just go ahead and first try to hide the
config structure for a lead configuration.
Here we will be finding the device aid for you, right?
If you just go to the X parameter and if you look for an elderly now when you named your IP within usage,
you could clearly see that this easily helps to find out the specific data related to that IP instance.
So here we require to specify the device will just be copying in this, and then we'll be adding it
over here, right?
This is the only thing that we need to specify and then will be initializing AI in TPA, which is working
on an entity, right?
So to do that, we have a C of G initialize function that will basically be requiring three things.
OK, first one is an instance finder, then the config structure and finally an interest rate so will
go ahead would like to hear.
So for us, the instance for a is named as ADA.
OK.
The config structure will be a lily config.
And then to get an access to the base address, we going just be utilizing the data from an config structure,
right?
We could in fact specify the base address right directly from makes parameter dot h.
That could also be automatic.
Right now, we need to store this status and then we need to compare rates already just declared to
variable status one or status L, which will be working within a lady and then status s, which will
be working with N Switch, right?
So whatever value this, Rutan's will just be storing and going to status and right.
Similar thing we need to do for Switch also, so we'll just copy this function.
This will be replacing red switch config right down here.
The device idea that we need to specify is related to switch.
So we'll just copy this will be adding a door here.
Right?
The status will be stewarding in status.
S right.
And then we will be going ahead.
The instance for us, which is switch instance, OK, the structure is switch config, right?
And then to exist, we suggest we could just use switch config basically straight.
So this completes the mandatory steps that are required for initialization.
Now we'll just be comparing.
So if both of those read the Nexus two sexes that basically represent our device, initialization is
successful right to status and ended with status.
Yes, if that is equal to existing success, so this is possible only when both of them do it in Texas,
so if that is the case, will just be.
Sending the message that initialization is successful, right, so will use the brain death, and then
here we could just mention a lady and switch.
Success really in the.
Sure, that's right.
And we will just be adding again.
It's the third death, OK, and we'll just be mentioning in it.
Right.
So this is the mandatory step that we need to perform.
We'll just see what cool that it just try to understand the area that we have right to here.
We just need to remove once, OK?
This will probably remove the area that we have over here.
Here the is OK, and this is not required, right?
So now we have our entire corps completed for an initialization right to what we did is since we have
a two different instance of a paper, we need to initialize both of them.
So we utilize lookup config.
We specify the device A.D. and then we utilize of genius, right?
So same process we follow for both a as well as switch, right?
And then we are checking with the boot of them.
That is status of code initialize for LCD, as well as status for CFD and initialize of search rate
and existing success.
So if that is the case and search, both are successfully initialized and we'll just be sending the
message that initialization field right when we complete this will go ahead and will call this init
function.
So this will basically initialize our benefit.
Right then here we will add the method starting.
This dog, so this is the first thing that we do now will proceed with setting up a direction.
OK.
And then the apes that we have to send Selita and send it to the output device, right?
So if you go to an QPR or take two, once we complete an initial edition, we have a detailed directions.
OK, so here we need to specify a GPO instance.
Is it China?
No, no.
Remember, we selected single channel for both of an IP, so we just need to add one.
OK, and that addiction was so, for example, out of 32 bins that we have on an IP.
How many of them you want to set as an input on an output could be handled within direction.
So we'll just explore the detail of this specific function.
Right now, this sector input and output direction for all the discrete signal for the specified TBI
or change.
Right?
The first argument is that it's just going to get off the GPIO.
Then second one is the China number.
So whether you have a single channel or whether you are targeting on multiple Jane, remember we are
targeting on a single channel.
And then we need to use it.
Direction my state.
So Big Tech to zero our output.
OK.
And set to one, I input out of 32 bit.
You could specifically choose how many of them will be working as an input and how many of them will
be working as in trade.
So for an output, we need to apply zero and for an input, we need to apply one.
So let me just copy this.
OK.
We'll go to Hallowell Dot C.
We'll start with setting up direction for our elite instance rate, so all of the bits we need to set
as an output.
OK, and we only have four elderly, so we need to just focus on the Alice before bit out of use today.
Great.
So we specify an elderly instance the number of changes that we have on our IP as well.
OK.
And we just need to work around with the left before, but out of the 32 bit rate.
So this function, expect the argument to be you 32.
But we could just specify the list before the rest of them will simply be don't care or won't be affecting
our operation, right?
We'll just be adding 0x that basically mean the number that will be specifying is an extra decimal number,
and we'll just be adding a zero.
So when we added zeros that basically mean this, four pins will be considered as an output rate.
So this we already look to a higher rate when we add a zero in the direction, much so they are considered
as an output.
The next.
So we only specified the list before, but rest will simply be don't go.
And if we do not specify what, they will simply be having a value of all zero, right?
So this basically mean all the 32 bins, OK, which are capable of looking at this function are behaving
as A..
Right.
The next thing that will be doing is to set up the direction for our switch, right?
So we have a switch instance.
This is also an alleged instance.
The number of changes that we have on that type is also one.
And here we want to set them as an input.
So we'll just be adding a one two four one basically retreated into a hexadecimal f, right.
So since we are utilizing X, that basically mean we are putting a number in and hexadecimal flight
format, right?
So this will set our four bins for an LCD instance as an output and for switch.
And since the effect is an input rate, this complete the next process that is setting up the direction.
Then we could look for an API that will help us to read and write the data, right?
So we have a discrete tree that could be used to either data and then we have a discrete right that
could be used to write the reader to the specific points rate.
So let me just go ahead and try to explore the functionality of this function.
So this read the suite of discrete for the specified GPI chain.
OK.
We just need to pass an instance and the chain is right, so we'll just go ahead and just basically
returns.
You thirty two, right?
So let me just declare one of available that will be storing the value of switch rate.
So we'll just be naming this as which data will be initializing it to a zero rate.
Then switch data will be equal to the API that we have to read the pin.
OK, and then the instance will be switch instance a the change number is what right?
So this will read the data from switches, so get false light switches and then we will be sending the
same d down to analytics, right?
So to do that, we do have a specific function such as discrete right, right.
We explore this.
This is used to write the data to the specified bend of view.
OK, we just need to pass an instance, the channel number and the data.
So we'll go ahead.
And then we will be specifying an instance of the alleged instances led by the channel number one and
the data that we're going to send is switch data, right?
We will also be printing the data in between so that we are able to debug the values that we are syncing
OK from the switches or a value read OK will be directly considering the full bit value.
So let me just add the format specified to be perceived to be.
OK.
So this will remove unwanted C2 that are data with about right will be considering only the value which
are not equal to zero right?
Or what we could do is we could just add Person B.
So we will also be analyzing the bit where we have a value of C, right?
And we will be printing the data off switch data, right?
And this will be calling after one second, Rachel.
This basically means we'll be updating the data after an interval of one second.
Right.
And just be utilizing a look so this will run forever and dinner and this user apply a reset, right?
So this complete the whole goal is very simple.
We initialize both the benefit of the APIs.
OK, then we set up the detection for an input and output port, and then we are reading the data.
We are storing it into a variable and then we are writing the same data and manually, we are also printing
the value so that we are able to debug any dieting till we already it.
In big fight.
We'll just program our FPGA first.
Then we'll be selecting a folder where we have our Helloworld or C and will be we're ending it going
and hide.
OK.
In fact, in between we could just get Nick Di is to get me.
OK, so that we also able to analyze the value, right?
So let me just try to change the state of the switch.
So now you could see when all the switch are in high state, you could get 15, so if they just turn
off the MSP switch, we'll give you a lever to see seven.
Every turn of the next light switch, we're able to get three.
Then we have one and then finally see, OK, so be able to find out the values of a switch.
And along with that, LEDs are also turning on on and off, depending on the state of a slight edge
rate.
Now you understand how we could save the data from the processing system, utilizing any kind of ease
to any, and then we could trigger the benefit of which are connected to.