1
00:00:00,150 --> 00:00:07,140
We successfully complete the generation of a team, and what we want to do is we will be exporting the

2
00:00:07,530 --> 00:00:12,170
hardware into an SDK, so we'll just go to file export export.

3
00:00:12,420 --> 00:00:15,900
They will also be including of the extreme right.

4
00:00:16,290 --> 00:00:20,130
Once we do this, we will go ahead and will launch an SDK right away.

5
00:00:20,130 --> 00:00:23,070
I will start building our see application.

6
00:00:25,400 --> 00:00:31,220
OK, so we already have our hardware packed on Spec. Over here, which includes all the 1980 files,

7
00:00:31,220 --> 00:00:34,400
such as initializing the processing system a bit fine.

8
00:00:34,480 --> 00:00:40,430
OK, now we'll go ahead and will utilize the hellotel template that we have at this rate.

9
00:00:40,430 --> 00:00:43,280
So we'll just need this as GPL e-mail.

10
00:00:43,700 --> 00:00:47,540
OK, and then we'll be selecting in Hallowell dump, right?

11
00:00:48,800 --> 00:00:55,880
Now here, once we create a fight, a weakened law which try where we need to utilize foreign GPI,

12
00:00:55,970 --> 00:00:58,120
so we'll just go for a GPIO.

13
00:00:58,520 --> 00:01:00,290
Here you can see the driver.

14
00:01:00,650 --> 00:01:03,780
The recommended driver for us is GPI is right.

15
00:01:03,800 --> 00:01:08,720
So we'll just proceed, go to Helloworld or see OK, which is, I mean, fight.

16
00:01:09,080 --> 00:01:13,970
And then here we start adding RC application rate.

17
00:01:14,300 --> 00:01:19,080
First thing is, we will be including some of the mandatory drivers.

18
00:01:19,080 --> 00:01:26,030
So we have X will be estratégia, which will help us to work around with the periphery.

19
00:01:26,330 --> 00:01:32,450
OK, the next one that we're required is experimental stage, so that will provide us all the data related

20
00:01:32,450 --> 00:01:35,590
to the hardware right now.

21
00:01:35,600 --> 00:01:37,640
If you just explore GPI, OK?

22
00:01:37,910 --> 00:01:42,980
So what we did in a previous case, we again need to do to initialize the peripheral.

23
00:01:43,430 --> 00:01:44,730
OK, we require to structure.

24
00:01:44,750 --> 00:01:46,280
One is the config structure.

25
00:01:46,850 --> 00:01:50,020
OK, that will be declaring as a pointer.

26
00:01:50,030 --> 00:01:54,960
So they just need this as GPIO config, OK?

27
00:01:54,960 --> 00:01:59,060
And we required the structure, which will hold an instance.

28
00:01:59,060 --> 00:02:01,970
The director will just be calling this structure.

29
00:02:02,000 --> 00:02:05,640
We're here and we will be naming it as GPI, right?

30
00:02:05,680 --> 00:02:07,880
So this will be a simple structure.

31
00:02:07,880 --> 00:02:09,230
It won't be a point, right?

32
00:02:09,710 --> 00:02:12,770
Then we declared one function that will be.

33
00:02:14,150 --> 00:02:21,530
Initializing are petrified, right, so let me just go ahead and try to add the initialization.

34
00:02:22,100 --> 00:02:27,410
So first we'll look for the device aile, and for that we do have information to the function that we'll

35
00:02:27,410 --> 00:02:32,080
be utilizing is GPIO look configure and this returns the config structure.

36
00:02:32,090 --> 00:02:35,900
OK, so we just need to buy this argument and the device idea, right?

37
00:02:35,990 --> 00:02:43,690
So for the config structure is GPIO config, OK, and this will be attaching to the lookup config function.

38
00:02:43,700 --> 00:02:49,070
And here we need to pass the device A.D. So to get the device to you just need to go to experimentar

39
00:02:49,070 --> 00:02:50,640
to attach file look for.

40
00:02:51,980 --> 00:02:59,030
OK, and then you get this macro, OK, which you just need to apply here, right?

41
00:02:59,570 --> 00:03:00,540
This is the first step.

42
00:03:00,560 --> 00:03:07,350
The next step will be to use the initialize to initialize the Palestinian, right.

43
00:03:07,370 --> 00:03:10,960
So if we go to stupid old dart, yes.

44
00:03:10,960 --> 00:03:18,680
So here you have CFD initialization, which again requires three arguments so instance structure, config

45
00:03:18,680 --> 00:03:20,150
structure and interest rate.

46
00:03:20,180 --> 00:03:23,090
So again, address could be found out from experimentar.

47
00:03:23,090 --> 00:03:23,750
Don't actually.

48
00:03:24,980 --> 00:03:34,640
First argument is the ancient structure, which is GPIO, then conflict structure, so you can think,

49
00:03:35,540 --> 00:03:36,920
OK in the last one is a base.

50
00:03:37,230 --> 00:03:42,350
So if you go to experimental door that you could find out, double etc. so you just need to pass it.

51
00:03:42,620 --> 00:03:46,400
And that's basically written whether initialization is successful or not.

52
00:03:46,430 --> 00:03:46,620
Right.

53
00:03:46,670 --> 00:03:54,860
So to check whether initialization is successful or not, they'll just declare in status and then whatever

54
00:03:54,860 --> 00:03:58,850
this function rate, and we'll just be storing in this variable save.

55
00:04:00,950 --> 00:04:03,730
Does 60 success?

56
00:04:03,770 --> 00:04:12,410
OK, we could see that we successfully initialize the device rate so the cell brain death, and then

57
00:04:12,410 --> 00:04:14,660
we could just mention device in it.

58
00:04:16,670 --> 00:04:17,780
Successful rate.

59
00:04:19,550 --> 00:04:28,340
Else is this we could just be mentioning that we failed to initialize our basic rate will again be adding

60
00:04:28,350 --> 00:04:32,580
till primitive device initialization free rate.

61
00:04:32,930 --> 00:04:36,560
So this is what we are going to do in any next function.

62
00:04:36,830 --> 00:04:39,140
Now, after the initial are you what?

63
00:04:39,240 --> 00:04:39,610
Right?

64
00:04:39,620 --> 00:04:42,680
So we will just be calling this innate function.

65
00:04:42,680 --> 00:04:45,830
So this will automatically initialize our base very late.

66
00:04:45,830 --> 00:04:53,870
And then we start with a message that we are starting our test rate so that they just go ahead and mention

67
00:04:53,870 --> 00:05:00,620
we are starting the or e-mail list right now.

68
00:05:00,620 --> 00:05:01,940
Here we relied on logic.

69
00:05:02,120 --> 00:05:05,330
So the first thing that we do is to set the direction for report.

70
00:05:05,340 --> 00:05:12,300
So if you go ahead to and we will be predominantly working on a into do not work with this bank API

71
00:05:12,320 --> 00:05:18,650
to instead work on a ping API, Rachel, we have the same direction, OK, which required an instance

72
00:05:18,650 --> 00:05:20,900
structure, pin number and the direction.

73
00:05:21,800 --> 00:05:23,930
OK, well, just go ahead.

74
00:05:24,890 --> 00:05:28,550
And this way required to specify for each pin, right?

75
00:05:28,550 --> 00:05:31,200
So for us, an incident structure is GPIO.

76
00:05:31,960 --> 00:05:38,150
OK, the next day is the pin number, so first pin will be fifty four and we already know that we connected

77
00:05:38,750 --> 00:05:46,740
switches at the ellipse before because the GPI will create so Fifty-Four will be a switch.

78
00:05:46,760 --> 00:05:49,910
So here we need to set the direction to be input, right?

79
00:05:49,920 --> 00:05:52,670
And we already know if you just explore this function.

80
00:05:52,940 --> 00:05:56,570
So for setting any of the pain as an input, we just need to apply.

81
00:05:56,570 --> 00:05:59,240
Zero rate will apply zero here.

82
00:06:00,440 --> 00:06:07,760
So when we consider planning, but what we do not need to utilize the output enablement rate, so this

83
00:06:07,760 --> 00:06:09,860
will be doing for all the input that we have.

84
00:06:10,490 --> 00:06:17,870
So here we said pin number 54, 55 56 57, which represent the database, which is at an input trade.

85
00:06:18,080 --> 00:06:23,410
The next one will be doing the same thing for our reality now when we considered an elderly.

86
00:06:23,480 --> 00:06:29,000
So we need to do two things that is first, we need to set the direction as an output and then we also

87
00:06:29,000 --> 00:06:30,650
need to enable an output rate.

88
00:06:31,010 --> 00:06:36,530
So the pin, the EMI number there, we will be having our it.

89
00:06:36,800 --> 00:06:43,340
Fifty eight, fifty nine, then sixty and sixty one night to set this as an output.

90
00:06:43,550 --> 00:06:46,280
We need to apply one one one nine.

91
00:06:46,280 --> 00:06:46,820
What right?

92
00:06:47,600 --> 00:06:51,980
And then we need to do one more thing that is we need to enable and operate.

93
00:06:51,980 --> 00:06:53,510
So we have a function to do that.

94
00:06:54,140 --> 00:06:58,370
So set output enable PIN and we just need to apply one over here.

95
00:06:58,400 --> 00:07:02,870
Right again, we need to pass an instance structure and a pin number.

96
00:07:02,870 --> 00:07:04,190
So let me just square.

97
00:07:04,700 --> 00:07:07,940
First is an instance name, OK, which is GPIO.

98
00:07:08,240 --> 00:07:10,490
PIN number is fifty eight, OK?

99
00:07:10,490 --> 00:07:17,240
And then we just need to apply one right this way required to do for all the bins where we have our

100
00:07:17,240 --> 00:07:18,140
l'église right.

101
00:07:18,320 --> 00:07:24,500
So we have our digits at 58, 59, 60 and 61, right?

102
00:07:24,500 --> 00:07:30,980
So we said the direction for all the points where we have our elderly as well as we also enable an output

103
00:07:30,980 --> 00:07:31,220
rate.

104
00:07:31,220 --> 00:07:38,300
And here we set all the bins where we have a sutures as an input rate, so we could just add a message

105
00:07:38,300 --> 00:07:47,590
over here setting fifty eight, fifty nine, sixty and sixty one as output.

106
00:07:49,060 --> 00:07:49,390
Right.

107
00:07:49,750 --> 00:07:55,120
So this complete all the initialization of a particular line setting up our direction now we could write

108
00:07:55,510 --> 00:08:01,870
the mean code, which will be running throughout the span of an application.

109
00:08:02,650 --> 00:08:07,780
So to read the reader, what are we going to do is we'll be reading the data from a switch, OK, and

110
00:08:07,780 --> 00:08:11,800
then that data will be applying to the daily rate.

111
00:08:12,130 --> 00:08:19,750
So if you just analyze the driver for hobbyists who do read up in, you had this function and that basically

112
00:08:19,750 --> 00:08:21,230
read and you started right.

113
00:08:21,490 --> 00:08:28,180
So we will be utilizing the same leadership here we required for variable rate so each switch data will

114
00:08:28,180 --> 00:08:30,900
be inside available to you to redo.

115
00:08:32,060 --> 00:08:35,710
OK, we'll just be naming this as zero six one.

116
00:08:36,130 --> 00:08:38,360
Switch two and Switch three.

117
00:08:38,380 --> 00:08:44,200
OK, so these are all variable, which will be holding the data that will be reading utilizing the read

118
00:08:44,210 --> 00:08:45,430
brain function that we have.

119
00:08:45,430 --> 00:08:48,850
So we'll just be initiating them to zero.

120
00:08:50,150 --> 00:08:56,480
OK, so let me just go ahead and try to utilize the redefine function, right, so we just need to pass

121
00:08:56,480 --> 00:08:56,810
an.

122
00:08:57,890 --> 00:08:59,870
Instance structure and a pin number.

123
00:09:00,910 --> 00:09:05,340
So infrastructure is GPO and the pin number for our switches.

124
00:09:05,350 --> 00:09:05,920
Fifty four.

125
00:09:06,760 --> 00:09:12,270
So we apply the same logic for pin number fifty five, fifty six and fifty seven, right?

126
00:09:12,280 --> 00:09:17,590
So far, all the switches will be reading the value and will be storing them in their respective variable.

127
00:09:17,590 --> 00:09:21,520
So for our first function, we will be storing it in zero.

128
00:09:22,450 --> 00:09:30,070
OK, then we have a Switch one, Switch two and then we have a Switch three, right?

129
00:09:31,430 --> 00:09:37,790
Next, we will be writing this data onto respect to early data to do that, we have a function right

130
00:09:37,790 --> 00:09:42,700
thing where we need to specify and instance structure benign data, right?

131
00:09:42,710 --> 00:09:44,330
So let me just go ahead.

132
00:09:45,350 --> 00:09:54,020
So instance structure is GPIO in number we have is fifty eight, OK, which is the first thing where

133
00:09:54,020 --> 00:09:55,130
we have our ability.

134
00:09:55,910 --> 00:10:01,200
Then the data so far, First Lady will just be sending such so right.

135
00:10:02,290 --> 00:10:09,460
Will just be gulping this and pasting it full time rate the next day leads at fifty nine, where we

136
00:10:09,460 --> 00:10:11,470
will be sending the data from search one.

137
00:10:12,670 --> 00:10:16,900
OK, so this complete accord, what are we going to do is we'll also be printing the value that we are

138
00:10:16,900 --> 00:10:19,540
receiving, so that will help us to debugger value, right?

139
00:10:19,870 --> 00:10:20,560
So they'll.

140
00:10:21,580 --> 00:10:23,110
Brain death, OK?

141
00:10:23,680 --> 00:10:28,210
Value read from the switch we'll get to city to.

142
00:10:29,980 --> 00:10:38,010
Switch one switch to the last one is Switch three, right, and the variable which are holding this

143
00:10:38,010 --> 00:10:42,450
value are switches to switch one, switch to Switch three.

144
00:10:43,310 --> 00:10:43,450
Right.

145
00:10:43,500 --> 00:10:48,960
So this allows us to see whether the code is working at the expected rate so we could manipulate the

146
00:10:48,960 --> 00:10:49,540
result.

147
00:10:49,560 --> 00:10:55,980
We could verify the result that we are getting on the diesel console with the Switch Street rate and

148
00:10:55,980 --> 00:10:59,220
will be setting each new value in an interval of two seconds.

149
00:10:59,440 --> 00:11:04,230
So this is an entire logic that we going above perform right to what we are doing.

150
00:11:04,260 --> 00:11:05,880
We are reading the value from a switch.

151
00:11:06,330 --> 00:11:11,460
Then we are applying the same value to the respective values, and we are also printing the values that

152
00:11:11,460 --> 00:11:13,200
we are getting on a switch, right?

153
00:11:13,200 --> 00:11:16,170
So this helps to verify the data with the switch state.

154
00:11:16,530 --> 00:11:21,480
And then we are sensing the value of a switch after an interval of music.

155
00:11:21,810 --> 00:11:28,320
So once you complete the score now, we could just proceed to downloading the program onto an FPGA who

156
00:11:28,320 --> 00:11:30,030
will just hit program FPGA.

157
00:11:30,160 --> 00:11:34,860
OK, this will automatically invoke the big fight that we exported from and we will do.

158
00:11:36,800 --> 00:11:42,560
So once programming is done, we could go ahead where we have our head of the world or see OK and then

159
00:11:42,560 --> 00:11:44,630
right click run as launch.

160
00:11:45,090 --> 00:11:51,800
So before this, what we could do is we could just is to get them in to the respective comfort that

161
00:11:51,800 --> 00:11:56,660
you have right and then proceed to launch on how to write.

162
00:11:58,160 --> 00:12:02,990
Now, if you see all those details, OK, so here we forget to add a new line character.

163
00:12:03,410 --> 00:12:09,470
Yes, we'll will just add a new line character and then will again relaunch our debug session.

164
00:12:11,000 --> 00:12:14,060
So now you could see by default on the Switch are in zero.

165
00:12:14,330 --> 00:12:18,290
So I'll now try to turn on Switch clearly.

166
00:12:18,470 --> 00:12:25,640
So the first and be just turned on, no right that you could see the next one, then next one, right

167
00:12:25,640 --> 00:12:26,680
and then final.

168
00:12:26,780 --> 00:12:31,130
Now you could see all the switch are turned off and respectively, all the ladies are also on.

169
00:12:31,430 --> 00:12:32,360
So now we'll see.

170
00:12:32,840 --> 00:12:33,890
Turn them off, right?

171
00:12:34,040 --> 00:12:41,450
So we will first turn off Switch three, then we will turn or switch to and then switch one and finally

172
00:12:41,450 --> 00:12:42,380
switch seats.

173
00:12:42,530 --> 00:12:42,860
Right?

174
00:12:43,190 --> 00:12:44,860
So the cold is working as expected.

175
00:12:44,900 --> 00:12:53,310
Now you're good now you know how you utilize the e-mail, OK, to sense the signal from the GPIO.

176
00:12:53,330 --> 00:12:59,600
And along with that, we also understand how we applied the signal to the GPI process.
