TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
TM_ROTARY_ENCODER_Functions

Library Functions. More...

Functions

void TM_RE_Init (TM_RE_t *data, GPIO_TypeDef *GPIO_A_Port, uint16_t GPIO_A_Pin, GPIO_TypeDef *GPIO_B_Port, uint16_t GPIO_B_Pin)
 Prepare Rotary Encoder to work. More...
 
void TM_RE_SetMode (TM_RE_t *data, TM_RE_Mode_t mode)
 Set rotary encoder custom mode. More...
 
TM_RE_Rotate_t TM_RE_Get (TM_RE_t *data)
 Checks and gets new values of rotary encoder. More...
 
void TM_RE_Process (TM_RE_t *data)
 Process function. More...
 

Detailed Description

Library Functions.

Function Documentation

TM_RE_Rotate_t TM_RE_Get ( TM_RE_t data)

Checks and gets new values of rotary encoder.

Parameters
*dataPointer to TM_RE_t structure
Return values
Memberof TM_RE_Rotate_t
void TM_RE_Init ( TM_RE_t data,
GPIO_TypeDef *  GPIO_A_Port,
uint16_t  GPIO_A_Pin,
GPIO_TypeDef *  GPIO_B_Port,
uint16_t  GPIO_B_Pin 
)

Prepare Rotary Encoder to work.

Parameters
*dataPointer to TM_RE_t structure
Return values
None
void TM_RE_Process ( TM_RE_t data)

Process function.

Note
This function have to be called inside your interrupt handler.
Parameters
*dataPointer to rotary encoder TM_RE_t data where interrupt occured
Return values
None
void TM_RE_SetMode ( TM_RE_t data,
TM_RE_Mode_t  mode 
)

Set rotary encoder custom mode.

Parameters
*dataPointer to TM_RE_t structure for specific rotary encoder input
modeRotary mode you will use. This parameter can be a value of TM_RE_Mode_t enumeration
Return values
None