STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
SMARTCARD Exported Macros
Collaboration diagram for SMARTCARD Exported Macros:

Macros

#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__)
 Reset SMARTCARD handle gstate & RxState.
 
#define __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__)
 Flush the Smartcard DR register.
 
#define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__)
 Check whether the specified Smartcard flag is set or not.
 
#define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the specified Smartcard pending flags.
 
#define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__)
 Clear the SMARTCARD PE pending flag.
 
#define __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__)
 Clear the SMARTCARD FE pending flag.
 
#define __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__)
 Clear the SMARTCARD NE pending flag.
 
#define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__)
 Clear the SMARTCARD ORE pending flag.
 
#define __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__)
 Clear the SMARTCARD IDLE pending flag.
 
#define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified SmartCard interrupt.
 
#define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified SmartCard interrupt.
 
#define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __IT__)
 Checks whether the specified SmartCard interrupt has occurred or not.
 
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)
 Macro to enable the SMARTCARD's one bit sample method.
 
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)
 Macro to disable the SMARTCARD's one bit sample method.
 
#define __HAL_SMARTCARD_ENABLE(__HANDLE__)
 Enable the USART associated to the SMARTCARD Handle.
 
#define __HAL_SMARTCARD_DISABLE(__HANDLE__)
 Disable the USART associated to the SMARTCARD Handle.
 
#define __HAL_SMARTCARD_DMA_REQUEST_ENABLE(__HANDLE__, __REQUEST__)
 Macros to enable the SmartCard DMA request.
 
#define __HAL_SMARTCARD_DMA_REQUEST_DISABLE(__HANDLE__, __REQUEST__)
 Macros to disable the SmartCard DMA request.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_SMARTCARD_RESET_HANDLE_STATE

#define __HAL_SMARTCARD_RESET_HANDLE_STATE ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
do{ \
(__HANDLE__)->gState = HAL_SMARTCARD_STATE_RESET; \
(__HANDLE__)->RxState = HAL_SMARTCARD_STATE_RESET; \
} while(0U)
@ HAL_SMARTCARD_STATE_RESET

Reset SMARTCARD handle gstate & RxState.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 432 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_FLUSH_DRREGISTER

#define __HAL_SMARTCARD_FLUSH_DRREGISTER ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->DR)

Flush the Smartcard DR register.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 443 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_GET_FLAG

#define __HAL_SMARTCARD_GET_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
(((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))

Check whether the specified Smartcard flag is set or not.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
__FLAG__specifies the flag to check. This parameter can be one of the following values:
  • SMARTCARD_FLAG_TXE: Transmit data register empty flag
  • SMARTCARD_FLAG_TC: Transmission Complete flag
  • SMARTCARD_FLAG_RXNE: Receive data register not empty flag
  • SMARTCARD_FLAG_IDLE: Idle Line detection flag
  • SMARTCARD_FLAG_ORE: Overrun Error flag
  • SMARTCARD_FLAG_NE: Noise Error flag
  • SMARTCARD_FLAG_FE: Framing Error flag
  • SMARTCARD_FLAG_PE: Parity Error flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 460 of file stm32f4xx_hal_smartcard.h.

Referenced by SMARTCARD_WaitOnFlagUntilTimeout().

◆ __HAL_SMARTCARD_CLEAR_FLAG

#define __HAL_SMARTCARD_CLEAR_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->SR = ~(__FLAG__))

Clear the specified Smartcard pending flags.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
__FLAG__specifies the flag to check. This parameter can be any combination of the following values:
  • SMARTCARD_FLAG_TC: Transmission Complete flag.
  • SMARTCARD_FLAG_RXNE: Receive data register not empty flag.
Note
PE (Parity error), FE (Framing error), NE (Noise error) and ORE (Overrun error) flags are cleared by software sequence: a read operation to USART_SR register followed by a read operation to USART_DR register.
RXNE flag can be also cleared by a read to the USART_DR register.
TC flag can be also cleared by software sequence: a read operation to USART_SR register followed by a write operation to USART_DR register.
TXE flag is cleared only by a write to the USART_DR register.
Return values
None

Definition at line 479 of file stm32f4xx_hal_smartcard.h.

Referenced by HAL_SMARTCARD_Transmit_DMA().

◆ __HAL_SMARTCARD_CLEAR_PEFLAG

#define __HAL_SMARTCARD_CLEAR_PEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
do{ \
__IO uint32_t tmpreg = 0x00U; \
tmpreg = (__HANDLE__)->Instance->SR; \
tmpreg = (__HANDLE__)->Instance->DR; \
UNUSED(tmpreg); \
} while(0U)

Clear the SMARTCARD PE pending flag.

Parameters
__HANDLE__specifies the USART Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 486 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_CLEAR_FEFLAG

#define __HAL_SMARTCARD_CLEAR_FEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
#define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__)
Clear the SMARTCARD PE pending flag.

Clear the SMARTCARD FE pending flag.

Parameters
__HANDLE__specifies the USART Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 499 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_CLEAR_NEFLAG

#define __HAL_SMARTCARD_CLEAR_NEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:

Clear the SMARTCARD NE pending flag.

Parameters
__HANDLE__specifies the USART Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 506 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_CLEAR_OREFLAG

#define __HAL_SMARTCARD_CLEAR_OREFLAG ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:

Clear the SMARTCARD ORE pending flag.

Parameters
__HANDLE__specifies the USART Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 513 of file stm32f4xx_hal_smartcard.h.

Referenced by HAL_SMARTCARD_Receive_DMA().

◆ __HAL_SMARTCARD_CLEAR_IDLEFLAG

#define __HAL_SMARTCARD_CLEAR_IDLEFLAG ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:

Clear the SMARTCARD IDLE pending flag.

Parameters
__HANDLE__specifies the USART Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 520 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_ENABLE_IT

#define __HAL_SMARTCARD_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
((((__INTERRUPT__) >> 28U) == SMARTCARD_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & SMARTCARD_IT_MASK)): \
((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & SMARTCARD_IT_MASK)))
#define SMARTCARD_CR1_REG_INDEX
#define SMARTCARD_IT_MASK
SMARTCARD interruptions flag mask.

Enable the specified SmartCard interrupt.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
__INTERRUPT__specifies the SMARTCARD interrupt to enable. This parameter can be one of the following values:
  • SMARTCARD_IT_TXE: Transmit Data Register empty interrupt
  • SMARTCARD_IT_TC: Transmission complete interrupt
  • SMARTCARD_IT_RXNE: Receive Data register not empty interrupt
  • SMARTCARD_IT_IDLE: Idle line detection interrupt
  • SMARTCARD_IT_PE: Parity Error interrupt
  • SMARTCARD_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 535 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_DISABLE_IT

#define __HAL_SMARTCARD_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
((((__INTERRUPT__) >> 28U) == SMARTCARD_CR1_REG_INDEX)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & SMARTCARD_IT_MASK)): \
((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & SMARTCARD_IT_MASK)))

Disable the specified SmartCard interrupt.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
__INTERRUPT__specifies the SMARTCARD interrupt to disable. This parameter can be one of the following values:
  • SMARTCARD_IT_TXE: Transmit Data Register empty interrupt
  • SMARTCARD_IT_TC: Transmission complete interrupt
  • SMARTCARD_IT_RXNE: Receive Data register not empty interrupt
  • SMARTCARD_IT_IDLE: Idle line detection interrupt
  • SMARTCARD_IT_PE: Parity Error interrupt
  • SMARTCARD_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 551 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_GET_IT_SOURCE

#define __HAL_SMARTCARD_GET_IT_SOURCE ( __HANDLE__,
__IT__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
(((((__IT__) >> 28U) == SMARTCARD_CR1_REG_INDEX)? (__HANDLE__)->Instance->CR1: (__HANDLE__)->Instance->CR3) & (((uint32_t)(__IT__)) & SMARTCARD_IT_MASK))

Checks whether the specified SmartCard interrupt has occurred or not.

Parameters
__HANDLE__specifies the SmartCard Handle.
__IT__specifies the SMARTCARD interrupt source to check. This parameter can be one of the following values:
  • SMARTCARD_IT_TXE: Transmit Data Register empty interrupt
  • SMARTCARD_IT_TC: Transmission complete interrupt
  • SMARTCARD_IT_RXNE: Receive Data register not empty interrupt
  • SMARTCARD_IT_IDLE: Idle line detection interrupt
  • SMARTCARD_IT_ERR: Error interrupt
  • SMARTCARD_IT_PE: Parity Error interrupt
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 566 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE

#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)

Macro to enable the SMARTCARD's one bit sample method.

Parameters
__HANDLE__specifies the SMARTCARD Handle.
Return values
None

Definition at line 572 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE

#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT))

Macro to disable the SMARTCARD's one bit sample method.

Parameters
__HANDLE__specifies the SMARTCARD Handle.
Return values
None

Definition at line 578 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_ENABLE

#define __HAL_SMARTCARD_ENABLE ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)

Enable the USART associated to the SMARTCARD Handle.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 585 of file stm32f4xx_hal_smartcard.h.

Referenced by HAL_SMARTCARD_Init().

◆ __HAL_SMARTCARD_DISABLE

#define __HAL_SMARTCARD_DISABLE ( __HANDLE__)

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)

Disable the USART associated to the SMARTCARD Handle.

Parameters
__HANDLE__specifies the SMARTCARD Handle. SMARTCARD Handle selects the USARTx peripheral (USART availability and x value depending on device).
Return values
None

Definition at line 592 of file stm32f4xx_hal_smartcard.h.

Referenced by HAL_SMARTCARD_DeInit().

◆ __HAL_SMARTCARD_DMA_REQUEST_ENABLE

#define __HAL_SMARTCARD_DMA_REQUEST_ENABLE ( __HANDLE__,
__REQUEST__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR3 |= (__REQUEST__))

Macros to enable the SmartCard DMA request.

Parameters
__HANDLE__specifies the SmartCard Handle.
__REQUEST__specifies the SmartCard DMA request. This parameter can be one of the following values:
  • SMARTCARD_DMAREQ_TX: SmartCard DMA transmit request
  • SMARTCARD_DMAREQ_RX: SmartCard DMA receive request
Return values
None

Definition at line 602 of file stm32f4xx_hal_smartcard.h.

◆ __HAL_SMARTCARD_DMA_REQUEST_DISABLE

#define __HAL_SMARTCARD_DMA_REQUEST_DISABLE ( __HANDLE__,
__REQUEST__ )

#include <stm32f4xx_hal_smartcard.h>

Value:
((__HANDLE__)->Instance->CR3 &= ~(__REQUEST__))

Macros to disable the SmartCard DMA request.

Parameters
__HANDLE__specifies the SmartCard Handle.
__REQUEST__specifies the SmartCard DMA request. This parameter can be one of the following values:
  • SMARTCARD_DMAREQ_TX: SmartCard DMA transmit request
  • SMARTCARD_DMAREQ_RX: SmartCard DMA receive request
Return values
None

Definition at line 612 of file stm32f4xx_hal_smartcard.h.