Compare commits
No commits in common. "1020d3f997bc09898fe635bbea8ba05307a73858" and "b22b75ca8b73970fa569db888735c956fb694e90" have entirely different histories.
1020d3f997
...
b22b75ca8b
2 changed files with 0 additions and 26 deletions
|
|
@ -1,18 +1,2 @@
|
|||
#include "GPIO.h"
|
||||
#include "stm32f1xx_ll_gpio.h"
|
||||
|
||||
void GPIO_conf(GPIO_TypeDef * GPIOx, uint32_t PINx, uint32_t mode, uint32_t outputType, uint32_t pullMode){
|
||||
|
||||
LL_GPIO_InitTypeDef init;
|
||||
|
||||
//Activation de l'horloge
|
||||
if (GPIOx == GPIOA) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOA);
|
||||
else if (GPIOx == GPIOB) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOB);
|
||||
else if (GPIOx == GPIOC) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOC);
|
||||
else if (GPIOx == GPIOD) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_GPIOD);
|
||||
|
||||
//Configuration de la PIN
|
||||
LL_GPIO_StructInit(&init);
|
||||
init.Pin = PINx;
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,4 @@
|
|||
#ifndef GPIO_H
|
||||
#define GPIO_H
|
||||
|
||||
#include "stm32f103xb.h"
|
||||
#include "stm32f1xx_ll_gpio.h"
|
||||
#include "stm32f1xx_ll_bus.h"
|
||||
|
||||
void GPIO_conf(GPIO_TypeDef * GPIOx, uint32_t PINx, uint32_t mode, uint32_t outputType, uint32_t pullMode);
|
||||
|
||||
void GPIO_setPin(GPIO_TypeDef GPIOx, uint32_t PINx, int output);
|
||||
|
||||
void GPIO_readPin(GPIO_TypeDef GPIOx, uint32_t PINx);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue