#ifndef MYGPIO_H #define MYGPIO_H #include "stm32f10x.h" typedef struct { GPIO_TypeDef* GPIO; int GPIO_Pin; //numero de 0 a 15 int GPIO_Conf; //voir ci dessous } MyGPIO_Struct_TypeDef; #define In_Floating 0x04 #define In_PullDown 0x08 #define In_PullUp 0x18 // le 1 représente le fait qu'on est en pull up #define In_Analog 0x00 #define Out_Ppull 0x02 #define Out_OD 0x05 #define AltOut_Ppull 0x0A #define AltOut_OD 0x0D void MyGPIO_Init(MyGPIO_Struct_TypeDef * Data); int MyGPIO_Read(GPIO_TypeDef* GPIO, int GPIO_Pin);// renvoie 0 ou autre chose different de 0 void MyGPIO_Set(GPIO_TypeDef* GPIO, int GPIO_Pin); void MyGPIO_Reset(GPIO_TypeDef* GPIO, int GPIO_Pin); void MyGPIO_Toggle(GPIO_TypeDef* GPIO, int GPIO_Pin); #endif