20 lines
No EOL
649 B
C
20 lines
No EOL
649 B
C
#ifndef GPIO_H
|
|
#define GPIO_H
|
|
#include "stm32f10x.h"
|
|
|
|
#define In_Floating 0x4
|
|
#define In_PullDown 0x8 //attention bit odr pour differencier
|
|
#define In_PullUp 0xF //attention bit odr pour differencier p.160
|
|
#define In_Analog 0x0
|
|
#define Out_Ppull 0x2
|
|
#define Out_OD 0x6
|
|
#define AltOut_Ppull 0xA
|
|
#define AltOut_OD 0xE
|
|
|
|
void gpio_init( GPIO_TypeDef * gpio, char pin, char conf);
|
|
int gpio_read(GPIO_TypeDef *gpio, char gpio_Pin); //renvoie 0 ou autre chose different de 0
|
|
void gpio_set(GPIO_TypeDef *gpio, char gpio_Pin);
|
|
void gpio_reset(GPIO_TypeDef *gpio, char gpio_Pin);
|
|
void gpio_toggle(GPIO_TypeDef *gpio, char gpio_Pin);
|
|
|
|
#endif |