diff --git a/ProjetsKEIL/Drivers/Source/Principale.c b/ProjetsKEIL/Drivers/Source/Principale.c index 13624fb..038fe2a 100644 --- a/ProjetsKEIL/Drivers/Source/Principale.c +++ b/ProjetsKEIL/Drivers/Source/Principale.c @@ -4,13 +4,17 @@ int main ( void ) { int returnValue; - MyGPIO_Struct_TypeDef gpioA5_test = {GPIOA,5,Out_PullUp}; - MyGPIO_Init(&gpioA5_test); - MyGPIO_Set(GPIOA,5); - MyGPIO_Toggle(GPIOA,5); - MyGPIO_Toggle(GPIOA,5); - MyGPIO_Reset(GPIOA,5); + MyGPIO_Struct_TypeDef led = {GPIOA,5,Out_PullUp}; //led + MyGPIO_Struct_TypeDef bouton = {GPIOC,13,In_PullDown}; //bouton poussoir + MyGPIO_Init(&led); + MyGPIO_Init(&bouton); do{ + if(MyGPIO_Read(GPIOC,13)) + { + MyGPIO_Reset(GPIOA,5); + } else { + MyGPIO_Set(GPIOA,5); + } }while(1) ; } diff --git a/ProjetsKEIL/Drivers/gpiodriver.uvoptx b/ProjetsKEIL/Drivers/gpiodriver.uvoptx index 78cd3e0..b3f96d1 100644 --- a/ProjetsKEIL/Drivers/gpiodriver.uvoptx +++ b/ProjetsKEIL/Drivers/gpiodriver.uvoptx @@ -414,22 +414,6 @@ 0 0 - 10 - 1 -
134218772
- 0 - 0 - 0 - 0 - 0 - 1 - .\Source\Principale.c - - \\cool_reel\Source/Principale.c\10 -
- - 1 - 0 6 1
0