1
00:00:00,060 --> 00:00:05,520
So let us start with adding a driver necessary for all the ideas that we have added, Rachel.

2
00:00:05,730 --> 00:00:11,430
If you go to a board support package, the recommended driver for our GPIO instance of an eyepiece is

3
00:00:11,730 --> 00:00:12,570
Dubai, right?

4
00:00:12,570 --> 00:00:17,130
So we just go ahead and there the queue, right?

5
00:00:17,610 --> 00:00:21,050
You just need to add a prefix that's X and then GPI, right?

6
00:00:21,750 --> 00:00:27,810
This is the driver file, which will be providing us the list of an EPA that allows us to interact with

7
00:00:27,810 --> 00:00:35,610
that GPI right along with this, we know that we need to have an access to environmental information

8
00:00:35,610 --> 00:00:41,590
which is present in that experimental, not accurate along with this to work with the engine controller.

9
00:00:41,910 --> 00:00:44,580
So if you just explore the again.

10
00:00:45,690 --> 00:00:48,250
OK, so we have an SUV, OK?

11
00:00:48,720 --> 00:00:50,910
That is our electric controller.

12
00:00:51,030 --> 00:00:51,360
OK.

13
00:00:51,810 --> 00:00:54,480
And that will be sensing and into from the sources.

14
00:00:54,480 --> 00:00:56,700
So we need to include this driver, right?

15
00:00:56,700 --> 00:00:57,660
So we go ahead.

16
00:00:57,840 --> 00:01:02,070
And then we had hash include, right?

17
00:01:03,110 --> 00:01:05,740
X, see you see, Dr..

18
00:01:06,410 --> 00:01:10,730
One more thing that we need to do is to enable an exception handler, OK?

19
00:01:10,730 --> 00:01:17,520
And for that, we have an EPA president until unless for exception daughter.

20
00:01:17,910 --> 00:01:21,540
So this will be the list of the drivers that you require.

21
00:01:21,680 --> 00:01:21,990
OK.

22
00:01:23,000 --> 00:01:27,860
As you work with that interest, be only difference as you use a different peripheral.

23
00:01:27,860 --> 00:01:30,080
Is the GPI driver, right?

24
00:01:30,080 --> 00:01:35,240
So that will be different for the rest of the drivers you would be requiring right now.

25
00:01:35,240 --> 00:01:40,500
If you analyze whatever you have summarized, the first step is to perform an initialization right to

26
00:01:40,500 --> 00:01:47,390
the initialization of both the the paper, as well as an x ray or an intra controller.

27
00:01:47,390 --> 00:01:49,460
So we will be proceeding.

28
00:01:50,930 --> 00:01:55,220
And first, let's just explore the GPI, right?

29
00:01:55,520 --> 00:01:59,570
So this consists of all the function that could be used to work around with that UPI.

30
00:02:00,050 --> 00:02:01,550
So we have a two structure, right?

31
00:02:01,550 --> 00:02:08,120
So GPI config, OK, which is a config structure that we will be adding and this will again be appointed.

32
00:02:08,460 --> 00:02:12,380
So let me just leave this stupid you can pick OK?

33
00:02:12,380 --> 00:02:15,100
And the next structure that we require is an instance.

34
00:02:15,470 --> 00:02:18,770
So we just copy and then we add it all here, right?

35
00:02:18,770 --> 00:02:22,770
So these are the two structure which are required for initialization, you go.

36
00:02:23,120 --> 00:02:26,500
That us declared one function, which we need it.

37
00:02:27,800 --> 00:02:31,720
This consists of all the functions that could be used to initialized UPI.

38
00:02:31,760 --> 00:02:32,030
Right?

39
00:02:32,600 --> 00:02:38,630
So if you go ahead, the first function that we call is look up configuration, where we will be by

40
00:02:38,710 --> 00:02:39,760
a single device, Heidi.

41
00:02:39,770 --> 00:02:42,080
And this can lead to conflict structure for us.

42
00:02:42,080 --> 00:02:45,130
So we go head to head and will not see, right?

43
00:02:45,140 --> 00:02:51,920
So you can say, OK, so our code structure will be was to look up conflict where we are a device.

44
00:02:52,190 --> 00:02:56,900
So if you go to an X parameter dot fight and search for you.

45
00:02:57,140 --> 00:02:57,460
Right.

46
00:02:57,470 --> 00:03:03,110
So here you get the device that you need to add to a look up, right?

47
00:03:03,110 --> 00:03:05,320
So this will generate the config structure for us.

48
00:03:05,330 --> 00:03:10,190
And once we have a config structure, the initialization process is very simple.

49
00:03:10,190 --> 00:03:17,960
You just need to see if the initialize and designate criteria to first document is an instance structure,

50
00:03:18,410 --> 00:03:22,670
then you need to provide a config structure and finally be set.

51
00:03:22,790 --> 00:03:29,350
So these addresses were not a member of a config structure, so we could just access the basically stronger

52
00:03:29,360 --> 00:03:30,950
from the config structure itself.

53
00:03:30,980 --> 00:03:31,180
Right.

54
00:03:31,220 --> 00:03:35,240
So this new function will perform an initialization offered UPI.

55
00:03:35,420 --> 00:03:39,530
The next step is to check whether initialization is successful or not.

56
00:03:39,750 --> 00:03:45,620
Save status is equal to existing success rate in that case.

57
00:03:46,640 --> 00:03:47,870
The Proceed.

58
00:03:48,380 --> 00:03:52,160
OK, I mentioned GPIO in its success.

59
00:03:52,670 --> 00:03:55,700
This makes it and else we could just add.

60
00:03:56,820 --> 00:03:58,160
Keep you in it.

61
00:03:58,450 --> 00:03:58,950
We right?

62
00:04:00,300 --> 00:04:06,590
So whenever you are working with an interest to try to perform a configuration in any function set,

63
00:04:06,610 --> 00:04:11,460
right, so we know that you are working with the GPI and we want to utilize the switch, right?

64
00:04:11,460 --> 00:04:18,400
So the switch behave as an input put for so the configuration of output as an input should be done in

65
00:04:18,780 --> 00:04:20,190
init function itself, right?

66
00:04:20,430 --> 00:04:24,000
So that allow us to keep the algorithm often.

67
00:04:24,930 --> 00:04:32,130
Interrupt and then initialization separate, right, so all the initialization step, including configuration

68
00:04:32,130 --> 00:04:38,190
of different operations, setting up the direction, performing an initialization should be done in

69
00:04:38,190 --> 00:04:39,160
a single function.

70
00:04:39,200 --> 00:04:44,310
OK, whenever you are working with the complex applications or finding out specific.

71
00:04:45,350 --> 00:04:46,700
Bug becomes very easy.

72
00:04:47,010 --> 00:04:48,970
So this is what we got to do here.

73
00:04:49,290 --> 00:04:57,530
Now here we know that we want to utilize the bin as an input, so we go ahead and we set up the direction.

74
00:04:57,530 --> 00:05:00,500
All right, so we have a function to do that.

75
00:05:01,930 --> 00:05:06,310
OK, so safety direction can be used to set up the direction for.

76
00:05:07,900 --> 00:05:14,010
The specified rate, so we need to pass a it per child in the direction, right?

77
00:05:14,350 --> 00:05:15,100
And we knew that.

78
00:05:16,560 --> 00:05:21,960
For setting up the billions and output we need to actually look for setting pennies and input, we need

79
00:05:21,960 --> 00:05:23,940
to add what rates already just go ahead.

80
00:05:25,080 --> 00:05:31,970
Call this function right here, we need to add GPI, which is that instant structure we are utilizing

81
00:05:31,980 --> 00:05:32,760
a single it.

82
00:05:33,030 --> 00:05:35,580
And we want to utilize force, which is right.

83
00:05:35,580 --> 00:05:36,630
So we just need to add.

84
00:05:37,940 --> 00:05:38,600
Airport.

85
00:05:38,840 --> 00:05:39,120
Right?

86
00:05:39,140 --> 00:05:45,500
So if that basically is equally valid, you for one right and lets you set a better one.

87
00:05:45,800 --> 00:05:48,800
This will configure that plane as it input, right?

88
00:05:49,130 --> 00:05:52,070
So here we set up the direction of our.

89
00:05:53,160 --> 00:05:55,350
Peanuts, which is an input direction.

90
00:05:55,390 --> 00:06:02,400
Now here, one thing that is pending is you just need to add in, right, because this function return

91
00:06:02,400 --> 00:06:03,060
an intel.

92
00:06:03,220 --> 00:06:06,600
OK, so that be storing A.D.A. very well, that will be verified.

93
00:06:06,850 --> 00:06:07,800
So remember this thing.

94
00:06:08,100 --> 00:06:11,700
If you are working with a paper line, you are building a complex application.

95
00:06:11,700 --> 00:06:17,100
See that you incorporate all the configuration settings in that single function.

96
00:06:17,460 --> 00:06:17,590
Right.

97
00:06:17,670 --> 00:06:20,520
So this completes and initialization off UPI.
