1
00:00:00,150 --> 00:00:02,070
Let us try to understand the application.

2
00:00:02,490 --> 00:00:05,040
So first, we will be including all the mandatory flights.

3
00:00:05,100 --> 00:00:10,580
So if you go to a board support package, right, so the driver which is recommended for any time,

4
00:00:10,590 --> 00:00:11,870
arrives steamer.

5
00:00:12,450 --> 00:00:12,710
Right.

6
00:00:13,110 --> 00:00:14,460
And that is what we include.

7
00:00:14,570 --> 00:00:18,080
First, so harsh, including ex TMR City are not.

8
00:00:18,460 --> 00:00:21,300
So this is a driver file for our USA be.

9
00:00:21,630 --> 00:00:27,800
We also included experimental flights, so that gives us an access to all the hardware related information,

10
00:00:27,810 --> 00:00:27,990
right?

11
00:00:27,990 --> 00:00:36,060
So two other driver file that we require for Intrpt handling is the exception which perform initialization

12
00:00:36,060 --> 00:00:43,830
and enabling an internal exception handler for our CPU and all the gas related functions will be present

13
00:00:43,830 --> 00:00:44,800
in the next yoga.

14
00:00:45,720 --> 00:00:50,130
So first, we proceed with an initialization of timer rate.

15
00:00:50,130 --> 00:00:58,540
So if you just explore the driver file, right, so you have CMG initialize and lookup config then present,

16
00:00:58,800 --> 00:01:03,900
you also have an initialized function rate, so any of the material would prefer to perform an initialization,

17
00:01:03,900 --> 00:01:04,140
right?

18
00:01:04,380 --> 00:01:10,110
So here we prefer to perform an initialization utilizing extreme procedure at initialized we'll give,

19
00:01:10,180 --> 00:01:13,050
which just required to have an instance structure.

20
00:01:13,050 --> 00:01:14,670
And that is what we declare the order here.

21
00:01:14,670 --> 00:01:17,860
So we declare an instance structure, OK?

22
00:01:17,940 --> 00:01:22,080
And then we have one function that will perform an initialization of a timer, right?

23
00:01:22,090 --> 00:01:28,080
So this is the step one that we are performing where we initialize our benefit and then we proceed for

24
00:01:28,080 --> 00:01:29,880
initialization of what you see, right?

25
00:01:30,420 --> 00:01:33,150
So we declared once studious, does variable.

26
00:01:33,210 --> 00:01:37,520
OK, and this status will be quest to extend my S.T.A.R. initialize.

27
00:01:37,530 --> 00:01:42,810
So get this required an instance structure and the device added to device I like would be found out

28
00:01:42,810 --> 00:01:45,090
from the parameter attachment rate.

29
00:01:45,090 --> 00:01:51,600
So this function will perform an initialization of our timer IP and then it will return the status of

30
00:01:51,600 --> 00:01:52,590
initialization rate.

31
00:01:52,590 --> 00:01:57,480
We will be use to check whether initialization is successful or not.

32
00:01:57,480 --> 00:02:00,150
Great save status is equal to access to success.

33
00:02:00,540 --> 00:02:06,270
We'll just mention that timer and it's successful as we will just be adding a timer next, right?

34
00:02:06,270 --> 00:02:10,870
So this is how we perform an initialization of the exciting variety.

35
00:02:10,890 --> 00:02:17,760
Now you could follow the second method also that is you declared an instance structure of config structure

36
00:02:17,760 --> 00:02:25,710
call lookup config to generate the config structure and then quality of initialized rate admitted that

37
00:02:25,710 --> 00:02:29,220
we also know so you could also utilize that method if you want great.

38
00:02:30,440 --> 00:02:34,220
Because we do have a look up config and see if you initialize all right.

39
00:02:34,730 --> 00:02:37,900
The next step is to perform an initialization of a gas.

40
00:02:38,100 --> 00:02:38,390
Right.

41
00:02:38,390 --> 00:02:44,480
So for example, we do not have anything as a initialize, so we need to declare the conflict structure

42
00:02:44,480 --> 00:02:46,370
as well as an instance structure, right?

43
00:02:46,370 --> 00:02:52,220
So here we declare config structure for radius and an instance structure for AGC, right?

44
00:02:52,520 --> 00:02:55,610
Then we call lookup config where we pass the device.

45
00:02:55,610 --> 00:02:55,970
80.

46
00:02:56,000 --> 00:02:56,270
Right.

47
00:02:56,270 --> 00:03:01,760
So this will need the config structure for us and then we will be utilizing this config structure.

48
00:03:01,790 --> 00:03:06,980
OK, along with that, instead structuring the base address to perform an initialization right to this

49
00:03:06,980 --> 00:03:12,710
function, CFD initialize basically return the studios of an initialization, which we are storing in

50
00:03:12,710 --> 00:03:13,070
SD.

51
00:03:13,080 --> 00:03:15,650
This variable life status is equal to exist.

52
00:03:15,650 --> 00:03:20,030
Isakson's will then be mentioning GC and it is successful LS.

53
00:03:20,030 --> 00:03:22,490
We can mention GC unity, right?

54
00:03:22,490 --> 00:03:28,730
So this complete the process of initialization of proof that as well as a GC right now will be considered

55
00:03:28,730 --> 00:03:28,940
a bit.

56
00:03:29,150 --> 00:03:34,310
Or you could actually perform a configuration of the peripheral in the init function itself.

57
00:03:34,370 --> 00:03:34,640
Right.

58
00:03:34,640 --> 00:03:37,970
So here all the time and configuration could be done here.

59
00:03:37,970 --> 00:03:38,670
It's set right.

60
00:03:38,680 --> 00:03:43,290
So what we could do is to we could go ahead and calculate the delay.

61
00:03:43,320 --> 00:03:48,260
Now we know that our dimer is operating at 50 megahertz frequency right to.

62
00:03:48,530 --> 00:03:55,760
You need the delay of two seconds since our IXI dimer maybe operates at 50 Maiga, so we need to first

63
00:03:55,760 --> 00:03:57,320
calculate the time periods of time.

64
00:03:57,320 --> 00:04:00,470
Period will be when divide by 50 megahertz, right?

65
00:04:00,480 --> 00:04:05,510
So three and three, so five and then seven zero, right?

66
00:04:05,510 --> 00:04:06,710
So this is 50 megahertz.

67
00:04:06,740 --> 00:04:08,120
We need to first cancel it out.

68
00:04:08,390 --> 00:04:12,260
So here we have full spectrum, which is 50 integrated.

69
00:04:12,260 --> 00:04:14,060
It's just exciting to get the delay of two.

70
00:04:14,170 --> 00:04:15,980
Again, we just need to multiply by two, right?

71
00:04:17,140 --> 00:04:21,340
We also need to enable the internet were great.

72
00:04:22,820 --> 00:04:28,730
So we take this count variable, OK, and we go to our time worrying information will to it here, right?

73
00:04:28,970 --> 00:04:31,770
And this will be a reset value for our time.

74
00:04:31,850 --> 00:04:32,050
Right.

75
00:04:32,060 --> 00:04:37,730
So we just need to call set reset value function, OK, and that will automatically.

76
00:04:38,830 --> 00:04:44,170
Configure a timer to generate the delay of two second rate, then we need to also set up the correct

77
00:04:44,170 --> 00:04:48,790
more great so two of working in operate mode, we need to include this option, right?

78
00:04:48,790 --> 00:04:51,280
And we also want our timer to operate in a mode.

79
00:04:51,490 --> 00:04:57,270
So this new option should be offered, OK, and then we use a set option to set this option to any side

80
00:04:57,280 --> 00:04:57,940
timer, right?

81
00:04:58,330 --> 00:04:59,830
This is what we gonna.

82
00:05:00,970 --> 00:05:07,120
And in a time where in so these are only the configuration that we need to do for our time right now,

83
00:05:07,120 --> 00:05:09,990
we could remove all this configuration from here, right?

84
00:05:10,360 --> 00:05:13,630
So section could be removed and this could also be great.

85
00:05:13,640 --> 00:05:17,380
So we just need to start our timer when we call our main application right.

86
00:05:17,390 --> 00:05:20,770
So in retirement, we are performing an initialization.

87
00:05:21,070 --> 00:05:26,620
We are also setting up the required count value for the relay that user is targeting, and we also have

88
00:05:26,620 --> 00:05:28,000
correctly set up the website.

89
00:05:28,000 --> 00:05:34,120
So to enable and interpret what we need to enable this option by ordering it with the existing option

90
00:05:34,120 --> 00:05:36,480
that we have and then use the set option rate.

91
00:05:36,490 --> 00:05:41,520
So this is the method that we've been using from the very beginning of the course, right?

92
00:05:42,580 --> 00:05:47,530
We are also considering the down ground option, OK, because we want to upgrade our time worrying about

93
00:05:47,740 --> 00:05:49,820
right now we go to a gas.

94
00:05:50,050 --> 00:05:53,650
OK, so we already discuss how we perform an initialization.

95
00:05:53,680 --> 00:05:56,560
Now we need to enable our exception handler, right?

96
00:05:56,560 --> 00:06:02,410
So we need to, first of all, exception and this will perform an exception handler initialization.

97
00:06:02,740 --> 00:06:06,300
Then in the register handler, we need to specify the type of an upgrade.

98
00:06:06,310 --> 00:06:12,700
So for us, it is I, Eric, you, the master handler will be gassy interrupt handler.

99
00:06:12,700 --> 00:06:15,690
And the last thing that we need to specify is the callback data.

100
00:06:15,690 --> 00:06:18,430
And this will be the instance structure, right?

101
00:06:19,540 --> 00:06:21,970
Finally, we need to enable an exception rate.

102
00:06:21,970 --> 00:06:26,380
So this is exactly what we've been doing from the start of this section.

103
00:06:26,490 --> 00:06:34,510
Rick, then we need to specify the function, which will serve as an interest handler for us, right?

104
00:06:34,720 --> 00:06:39,760
So whenever we have an intercom, a timer will get, we need to specify which should be the function

105
00:06:39,760 --> 00:06:42,760
that processes should be executing, right?

106
00:06:43,690 --> 00:06:44,680
So we call the connect.

107
00:06:45,690 --> 00:06:49,830
Here we need to add an incident structure, the unique IED that we get for timer.

108
00:06:49,870 --> 00:06:58,270
OK, so if you just explore the parameter each fight and look for the so you get the MRC director idea,

109
00:06:58,270 --> 00:06:58,440
right?

110
00:06:58,440 --> 00:07:01,080
So this is a unique idea that we get for our timer into.

111
00:07:02,120 --> 00:07:02,600
OK.

112
00:07:02,700 --> 00:07:04,820
And that is what we're going to specify over here.

113
00:07:05,180 --> 00:07:11,430
We also need to specify the function that will be executing when we have an interpreter from this victory.

114
00:07:11,570 --> 00:07:11,810
Right?

115
00:07:12,080 --> 00:07:17,930
So yeah, we declare a function calls SDMI Triangle, OK, and that is what we need to execute when

116
00:07:17,930 --> 00:07:18,950
we have an interpreter.

117
00:07:19,220 --> 00:07:24,530
So for a callback data, as we discussed in a previous case, you could just invoke the instance structure

118
00:07:24,530 --> 00:07:25,280
of the paper.

119
00:07:25,280 --> 00:07:31,550
And so for us, the dimer instance structure is steamer, and that is what we are considering for callback

120
00:07:31,550 --> 00:07:31,860
data.

121
00:07:31,880 --> 00:07:32,150
Right?

122
00:07:32,930 --> 00:07:33,740
Well, this is done.

123
00:07:34,010 --> 00:07:37,670
The next step is to enable this which is right tool to enable.

124
00:07:38,920 --> 00:07:39,740
This switch.

125
00:07:39,760 --> 00:07:44,050
OK, we need to just call Jack never again, that is what we are calling.

126
00:07:44,290 --> 00:07:48,880
And then you need to parse this do argument instance structure and the unique idea right now if you

127
00:07:48,880 --> 00:07:49,600
explore the.

128
00:07:50,440 --> 00:07:52,570
OK, so we do not have anything as.

129
00:07:54,130 --> 00:07:59,230
Interrupt, enable our global inquiry, so we do have something as an entertainer, but we do not have

130
00:07:59,230 --> 00:08:03,430
anything as the internet enabled or.

131
00:08:04,360 --> 00:08:10,120
The global interrupting Ebola, in that case, we could simply ignore that great, so we just need to

132
00:08:10,120 --> 00:08:12,100
do this and then we are ready to cooperate.

133
00:08:13,060 --> 00:08:17,800
So whenever you find a peripheral with the global injecting Ebola in and interrupting it, but you need

134
00:08:17,800 --> 00:08:20,950
to attack as you could simply skip that step, right?

135
00:08:20,950 --> 00:08:23,760
So by default, we will assume that this which is close.

136
00:08:24,760 --> 00:08:29,530
So when this is done, we go to declared our demand, right?

137
00:08:29,530 --> 00:08:34,230
So this will be the function that is that will be executed when we have an interpreter straight.

138
00:08:34,750 --> 00:08:41,460
So a once we enter into a function now, since we do not have anything as in disable are clear, interpret,

139
00:08:41,480 --> 00:08:48,130
twist or anything like that, OK, as we have in an GPO, here we are just verifying whether timer is

140
00:08:48,130 --> 00:08:53,710
really expired and to know that we have a function call as a.m. is expired, right where we need to

141
00:08:53,710 --> 00:08:56,490
specify an instance actually in the MRC den number.

142
00:08:57,370 --> 00:08:59,860
So if that is if the timer is really expired.

143
00:09:00,850 --> 00:09:06,940
OK, so we are just sending interest on to a council, right, and then we are calling a reset great.

144
00:09:06,940 --> 00:09:12,130
So like we are calling reset is because our counter will again be re initialized to provide the delay

145
00:09:12,130 --> 00:09:12,760
of second.

146
00:09:13,000 --> 00:09:15,520
And then this way we could generate the multiple event rate.

147
00:09:15,520 --> 00:09:21,650
So this is what we need to do when we do not have anything else interest, disable or clearing traps,

148
00:09:21,670 --> 00:09:23,220
duties and so on and so forth, right?

149
00:09:23,230 --> 00:09:25,420
So we just need to perform across.

150
00:09:25,630 --> 00:09:27,130
And then we need to.

151
00:09:28,650 --> 00:09:32,280
Come out of our entertainment, right, so that is what we are doing over here.

152
00:09:32,490 --> 00:09:34,710
We are checking whether interest is expired or not.

153
00:09:34,920 --> 00:09:37,270
Then we are sending the string on to a console.

154
00:09:37,290 --> 00:09:41,580
OK, so this is an algorithm that we are planning and then we are again resetting.

155
00:09:41,580 --> 00:09:46,770
Our counter says that it will be loaded with the count that provide us the delay of two second rate

156
00:09:47,010 --> 00:09:53,070
since the now here we are not utilizing it all to reload more rate if we have utilized an auto reload

157
00:09:53,070 --> 00:09:53,280
mode.

158
00:09:53,280 --> 00:09:55,830
In that case, we do not need to perform this reset, right?

159
00:09:56,640 --> 00:09:58,490
So this completes that entire code.

160
00:09:58,800 --> 00:10:02,220
OK, when we go to a mean application first, we call it that one.

161
00:10:02,220 --> 00:10:09,160
Does this consist of a code that help us to work around with the console without doing any configuration?

162
00:10:09,420 --> 00:10:12,990
Then we are calling the function that will perform initialization of a timer.

163
00:10:13,020 --> 00:10:18,360
OK, then we are calling the function that will perform initialization of a GC with all the configuration.

164
00:10:18,600 --> 00:10:20,850
And then we are starting our timer, right?

165
00:10:20,860 --> 00:10:24,870
So this will be continuously generating anyway at an interval of two seconds.

166
00:10:24,870 --> 00:10:30,490
And since we are working in an indirect mode, so we just add while one OK and doing nothing, Auggie,

167
00:10:30,720 --> 00:10:32,720
we are just waiting for an input to happen.

168
00:10:33,000 --> 00:10:35,850
So this company's actually just built our application code.

169
00:10:36,960 --> 00:10:40,020
And ones are very successful, right, so we will be.

170
00:10:41,220 --> 00:10:42,900
Relaunching our debug session.

171
00:10:44,250 --> 00:10:48,540
OK, so here we are, all really connected our way, this terminal to come.

172
00:10:48,810 --> 00:10:52,140
The only thing that we need to do is to click on this resume button, right?

173
00:10:52,140 --> 00:10:56,250
So you could see timer and it is successful and it is successful.

174
00:10:56,250 --> 00:11:03,420
So at an interval of two second, now you could observe that we are getting the event through all my

175
00:11:04,230 --> 00:11:04,950
time, right?

176
00:11:04,950 --> 00:11:09,020
So there's either side of event that we get at an interval of two seconds.
