Extended control functions.
More...
Extended control functions.
===============================================================================
##### Peripheral Control functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to initialize the SMARTCARD.
(+) HAL_SMARTCARDEx_BlockLength_Config() API allows to configure the Block Length on the fly
(+) HAL_SMARTCARDEx_TimeOut_Config() API allows to configure the receiver timeout value on the fly
(+) HAL_SMARTCARDEx_EnableReceiverTimeOut() API enables the receiver timeout feature
(+) HAL_SMARTCARDEx_DisableReceiverTimeOut() API disables the receiver timeout feature
◆ HAL_SMARTCARDEx_BlockLength_Config()
Update on the fly the SMARTCARD block length in RTOR register.
- Parameters
-
| hsmartcard | Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. |
| BlockLength | SMARTCARD block length (8-bit long at most) |
- Return values
-
Definition at line 100 of file stm32l4xx_hal_smartcard_ex.c.
102 MODIFY_REG(hsmartcard->
Instance->RTOR, USART_RTOR_BLEN, ((uint32_t)BlockLength << USART_RTOR_BLEN_Pos));
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
◆ HAL_SMARTCARDEx_DisableReceiverTimeOut()
Disable the SMARTCARD receiver timeout feature.
- Parameters
-
| hsmartcard | Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. |
- Return values
-
Definition at line 153 of file stm32l4xx_hal_smartcard_ex.c.
155 if (hsmartcard->
gState == HAL_SMARTCARD_STATE_READY)
160 hsmartcard->
gState = HAL_SMARTCARD_STATE_BUSY;
165 hsmartcard->
gState = HAL_SMARTCARD_STATE_READY;
__IO HAL_SMARTCARD_StateTypeDef gState
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
◆ HAL_SMARTCARDEx_EnableReceiverTimeOut()
Enable the SMARTCARD receiver timeout feature.
- Parameters
-
| hsmartcard | Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. |
- Return values
-
Definition at line 123 of file stm32l4xx_hal_smartcard_ex.c.
125 if (hsmartcard->
gState == HAL_SMARTCARD_STATE_READY)
130 hsmartcard->
gState = HAL_SMARTCARD_STATE_BUSY;
133 SET_BIT(hsmartcard->
Instance->CR2, USART_CR2_RTOEN);
135 hsmartcard->
gState = HAL_SMARTCARD_STATE_READY;
__IO HAL_SMARTCARD_StateTypeDef gState
◆ HAL_SMARTCARDEx_TimeOut_Config()
Update on the fly the receiver timeout value in RTOR register.
- Parameters
-
| hsmartcard | Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. |
| TimeOutValue | receiver timeout value in number of baud blocks. The timeout value must be less or equal to 0x0FFFFFFFF. |
- Return values
-
Definition at line 112 of file stm32l4xx_hal_smartcard_ex.c.
SMARTCARD_InitTypeDef Init
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))