add gpio config
This commit is contained in:
parent
f24d419c1b
commit
6ded190d3d
2 changed files with 4 additions and 3 deletions
|
@ -1,11 +1,12 @@
|
||||||
#include "IncrementalEncoder.h"
|
#include "IncrementalEncoder.h"
|
||||||
|
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
#include "GPIO.h"
|
||||||
|
|
||||||
void IncrementalEncoder_conf(TIM_TypeDef * timer)
|
void IncrementalEncoder_conf(TIM_TypeDef * timer, GPIO_TypeDef * gpio, int pin)
|
||||||
{
|
{
|
||||||
Timer_encoder_conf(timer);
|
Timer_encoder_conf(timer);
|
||||||
// TODO GPIO config
|
GPIO_conf(gpio, pin, LL_GPIO_MODE_INPUT, LL_GPIO_OUTPUT_PUSHPULL, LL_GPIO_PULL_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncrementalEncoder_start(TIM_TypeDef * timer)
|
void IncrementalEncoder_start(TIM_TypeDef * timer)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
* @param TIM_TypeDef Timer : indique le timer à utiliser : TIM1, TIM2, TIM3 ou TIM4
|
* @param TIM_TypeDef Timer : indique le timer à utiliser : TIM1, TIM2, TIM3 ou TIM4
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void IncrementalEncoder_conf(TIM_TypeDef * timer);
|
void IncrementalEncoder_conf(TIM_TypeDef * timer, GPIO_TypeDef * gpio, int pin);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Démarre le codeur incrémental associé au timer donné
|
* @brief Démarre le codeur incrémental associé au timer donné
|
||||||
|
|
Loading…
Reference in a new issue