diff --git a/ProjetsKEIL/Drivers/Source/Principale.c b/ProjetsKEIL/Drivers/Source/Principale.c
index 9b4d29a..b0c32bb 100644
--- a/ProjetsKEIL/Drivers/Source/Principale.c
+++ b/ProjetsKEIL/Drivers/Source/Principale.c
@@ -3,8 +3,11 @@
int main ( void )
{
- MyGPIO_Struct_TypeDef gpioA_test = {GPIOA,13,In_PullUp};
+ int returnValue=0;
+ MyGPIO_Struct_TypeDef gpioA_test = {GPIOB,8,In_PullDown};
MyGPIO_Init(&gpioA_test);
+ returnValue = MyGPIO_Read(GPIOB,8);
+ returnValue = returnValue;
do{
}while(1) ;
diff --git a/ProjetsKEIL/Drivers/gpiodriver.c b/ProjetsKEIL/Drivers/gpiodriver.c
index ed492b6..a7a19ae 100644
--- a/ProjetsKEIL/Drivers/gpiodriver.c
+++ b/ProjetsKEIL/Drivers/gpiodriver.c
@@ -25,7 +25,7 @@ void MyGPIO_Init(MyGPIO_Struct_TypeDef * GPIOStructPtr)
int MyGPIO_Read(GPIO_TypeDef * GPIO, uint8_t GPIO_Pin)
{
- return 0;
+ return (GPIO->IDR & (0x1 << GPIO_Pin)) > 0;
}
void MyGPIO_Set(GPIO_TypeDef * GPIO, uint8_t GPIO_Pin)
diff --git a/ProjetsKEIL/Drivers/gpiodriver.uvoptx b/ProjetsKEIL/Drivers/gpiodriver.uvoptx
index 9d1f1df..bd062ca 100644
--- a/ProjetsKEIL/Drivers/gpiodriver.uvoptx
+++ b/ProjetsKEIL/Drivers/gpiodriver.uvoptx
@@ -75,7 +75,7 @@
1
0
- 1
+ 0
18
@@ -125,7 +125,7 @@
0
DLGDARM
- (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1508,115,1929,542,1)(121=-1,-1,-1,-1,0)(122=875,109,1296,536,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=1499,115,1920,542,1)(121=-1,-1,-1,-1,0)(122=875,109,1296,536,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(234=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)
0
@@ -142,9 +142,57 @@
0
0
- 23
+ 10
1
- 134218316
+ 134218742
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Source\Principale.c
+
+ \\cool_Simule\Source/Principale.c\10
+
+
+ 1
+ 0
+ 9
+ 1
+ 134218734
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Source\Principale.c
+
+ \\cool_Simule\Source/Principale.c\9
+
+
+ 2
+ 0
+ 6
+ 1
+ 134218718
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ .\Source\Principale.c
+
+ \\cool_Simule\Source/Principale.c\6
+
+
+ 3
+ 0
+ 22
+ 1
+ 134218326
0
0
0
@@ -153,10 +201,10 @@
1
.\gpiodriver.c
- \\cool_Simule\gpiodriver.c\23
+ \\cool_Simule\gpiodriver.c\22
- 1
+ 4
0
4
1
@@ -171,38 +219,6 @@
\\cool_Simule\gpiodriver.c\4
-
- 2
- 0
- 11
- 1
- 134218228
- 0
- 0
- 0
- 0
- 0
- 1
- .\gpiodriver.c
-
- \\cool_Simule\gpiodriver.c\11
-
-
- 3
- 0
- 22
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- .\gpiodriver.c
-
-
-
@@ -210,6 +226,11 @@
1
voyons
+
+ 1
+ 1
+ returnValue
+
0
@@ -323,7 +344,7 @@
1
0
- 0
+ 1
18