Header file of SMARTCARD HAL module. More...
#include "stm32f4xx_hal_def.h"
Go to the source code of this file.
Classes | |
struct | __SMARTCARD_HandleTypeDef |
SMARTCARD handle Structure definition. More... | |
struct | SMARTCARD_InitTypeDef |
SMARTCARD Init Structure definition. More... | |
Macros | |
#define | __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) |
Clear the SMARTCARD FE pending flag. More... | |
#define | __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clear the specified Smartcard pending flags. More... | |
#define | __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) |
Clear the SMARTCARD IDLE pending flag. More... | |
#define | __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) |
Clear the SMARTCARD NE pending flag. More... | |
#define | __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) |
Clear the SMARTCARD ORE pending flag. More... | |
#define | __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) |
Clear the SMARTCARD PE pending flag. More... | |
#define | __HAL_SMARTCARD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE) |
Disable the USART associated to the SMARTCARD Handle. More... | |
#define | __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified SmartCard interrupt. More... | |
#define | __HAL_SMARTCARD_DMA_REQUEST_DISABLE(__HANDLE__, __REQUEST__) ((__HANDLE__)->Instance->CR3 &= ~(__REQUEST__)) |
Macros to disable the SmartCard DMA request. More... | |
#define | __HAL_SMARTCARD_DMA_REQUEST_ENABLE(__HANDLE__, __REQUEST__) ((__HANDLE__)->Instance->CR3 |= (__REQUEST__)) |
Macros to enable the SmartCard DMA request. More... | |
#define | __HAL_SMARTCARD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE) |
Enable the USART associated to the SMARTCARD Handle. More... | |
#define | __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the specified SmartCard interrupt. More... | |
#define | __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__) ((__HANDLE__)->Instance->DR) |
Flush the Smartcard DR register. More... | |
#define | __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
Check whether the specified Smartcard flag is set or not. More... | |
#define | __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __IT__) (((((__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. More... | |
#define | __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT)) |
Macro to disable the SMARTCARD's one bit sample method. More... | |
#define | __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
Macro to enable the SMARTCARD's one bit sample method. More... | |
#define | __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) |
Reset SMARTCARD handle gstate & RxState. More... | |
#define | HAL_SMARTCARD_ERROR_DMA 0x00000010U |
#define | HAL_SMARTCARD_ERROR_FE 0x00000004U |
#define | HAL_SMARTCARD_ERROR_NE 0x00000002U |
#define | HAL_SMARTCARD_ERROR_NONE 0x00000000U |
#define | HAL_SMARTCARD_ERROR_ORE 0x00000008U |
#define | HAL_SMARTCARD_ERROR_PE 0x00000001U |
#define | IS_SMARTCARD_BAUDRATE(BAUDRATE) ((BAUDRATE) < 10500001U) |
#define | IS_SMARTCARD_LASTBIT(LASTBIT) |
#define | IS_SMARTCARD_MODE(MODE) ((((MODE) & 0x0000FFF3U) == 0x00U) && ((MODE) != 0x000000U)) |
#define | IS_SMARTCARD_NACK_STATE(NACK) |
#define | IS_SMARTCARD_PARITY(PARITY) |
#define | IS_SMARTCARD_PHASE(CPHA) (((CPHA) == SMARTCARD_PHASE_1EDGE) || ((CPHA) == SMARTCARD_PHASE_2EDGE)) |
#define | IS_SMARTCARD_POLARITY(CPOL) (((CPOL) == SMARTCARD_POLARITY_LOW) || ((CPOL) == SMARTCARD_POLARITY_HIGH)) |
#define | IS_SMARTCARD_STOPBITS(STOPBITS) |
#define | IS_SMARTCARD_WORD_LENGTH(LENGTH) ((LENGTH) == SMARTCARD_WORDLENGTH_9B) |
#define | SMARTCARD_BRR(__PCLK__, __BAUD__) |
#define | SMARTCARD_CR1_REG_INDEX 1U |
#define | SMARTCARD_CR3_REG_INDEX 3U |
#define | SMARTCARD_DIV(__PCLK__, __BAUD__) ((uint32_t)((((uint64_t)(__PCLK__))*25U)/(4U*((uint64_t)(__BAUD__))))) |
#define | SMARTCARD_DIVFRAQ(__PCLK__, __BAUD__) ((((SMARTCARD_DIV((__PCLK__), (__BAUD__)) - (SMARTCARD_DIVMANT((__PCLK__), (__BAUD__)) * 100U)) * 16U) + 50U) / 100U) |
#define | SMARTCARD_DIVMANT(__PCLK__, __BAUD__) (SMARTCARD_DIV((__PCLK__), (__BAUD__))/100U) |
#define | SMARTCARD_DMAREQ_RX ((uint32_t)USART_CR3_DMAR) |
#define | SMARTCARD_DMAREQ_TX ((uint32_t)USART_CR3_DMAT) |
#define | SMARTCARD_FLAG_FE ((uint32_t)USART_SR_FE) |
#define | SMARTCARD_FLAG_IDLE ((uint32_t)USART_SR_IDLE) |
#define | SMARTCARD_FLAG_NE ((uint32_t)USART_SR_NE) |
#define | SMARTCARD_FLAG_ORE ((uint32_t)USART_SR_ORE) |
#define | SMARTCARD_FLAG_PE ((uint32_t)USART_SR_PE) |
#define | SMARTCARD_FLAG_RXNE ((uint32_t)USART_SR_RXNE) |
#define | SMARTCARD_FLAG_TC ((uint32_t)USART_SR_TC) |
#define | SMARTCARD_FLAG_TXE ((uint32_t)USART_SR_TXE) |
#define | SMARTCARD_IT_ERR ((uint32_t)(SMARTCARD_CR3_REG_INDEX << 28U | USART_CR3_EIE)) |
#define | SMARTCARD_IT_IDLE ((uint32_t)(SMARTCARD_CR1_REG_INDEX << 28U | USART_CR1_IDLEIE)) |
#define | SMARTCARD_IT_MASK |
SMARTCARD interruptions flag mask. More... | |
#define | SMARTCARD_IT_PE ((uint32_t)(SMARTCARD_CR1_REG_INDEX << 28U | USART_CR1_PEIE)) |
#define | SMARTCARD_IT_RXNE ((uint32_t)(SMARTCARD_CR1_REG_INDEX << 28U | USART_CR1_RXNEIE)) |
#define | SMARTCARD_IT_TC ((uint32_t)(SMARTCARD_CR1_REG_INDEX << 28U | USART_CR1_TCIE)) |
#define | SMARTCARD_IT_TXE ((uint32_t)(SMARTCARD_CR1_REG_INDEX << 28U | USART_CR1_TXEIE)) |
#define | SMARTCARD_LASTBIT_DISABLE 0x00000000U |
#define | SMARTCARD_LASTBIT_ENABLE ((uint32_t)USART_CR2_LBCL) |
#define | SMARTCARD_MODE_RX ((uint32_t)USART_CR1_RE) |
#define | SMARTCARD_MODE_TX ((uint32_t)USART_CR1_TE) |
#define | SMARTCARD_MODE_TX_RX ((uint32_t)(USART_CR1_TE |USART_CR1_RE)) |
#define | SMARTCARD_NACK_DISABLE 0x00000000U |
#define | SMARTCARD_NACK_ENABLE ((uint32_t)USART_CR3_NACK) |
#define | SMARTCARD_PARITY_EVEN ((uint32_t)USART_CR1_PCE) |
#define | SMARTCARD_PARITY_ODD ((uint32_t)(USART_CR1_PCE | USART_CR1_PS)) |
#define | SMARTCARD_PHASE_1EDGE 0x00000000U |
#define | SMARTCARD_PHASE_2EDGE ((uint32_t)USART_CR2_CPHA) |
#define | SMARTCARD_POLARITY_HIGH ((uint32_t)USART_CR2_CPOL) |
#define | SMARTCARD_POLARITY_LOW 0x00000000U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV10 0x00000005U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV12 0x00000006U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV14 0x00000007U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV16 0x00000008U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV18 0x00000009U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV2 0x00000001U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV20 0x0000000AU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV22 0x0000000BU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV24 0x0000000CU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV26 0x0000000DU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV28 0x0000000EU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV30 0x0000000FU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV32 0x00000010U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV34 0x00000011U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV36 0x00000012U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV38 0x00000013U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV4 0x00000002U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV40 0x00000014U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV42 0x00000015U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV44 0x00000016U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV46 0x00000017U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV48 0x00000018U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV50 0x00000019U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV52 0x0000001AU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV54 0x0000001BU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV56 0x0000001CU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV58 0x0000001DU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV6 0x00000003U |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV60 0x0000001EU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV62 0x0000001FU |
#define | SMARTCARD_PRESCALER_SYSCLK_DIV8 0x00000004U |
#define | SMARTCARD_STOPBITS_0_5 ((uint32_t)USART_CR2_STOP_0) |
#define | SMARTCARD_STOPBITS_1_5 ((uint32_t)(USART_CR2_STOP_0 | USART_CR2_STOP_1)) |
#define | SMARTCARD_WORDLENGTH_9B ((uint32_t)USART_CR1_M) |
Typedefs | |
typedef struct __SMARTCARD_HandleTypeDef | SMARTCARD_HandleTypeDef |
SMARTCARD handle Structure definition. More... | |
Enumerations | |
enum | HAL_SMARTCARD_StateTypeDef { HAL_SMARTCARD_STATE_RESET = 0x00U, HAL_SMARTCARD_STATE_READY = 0x20U, HAL_SMARTCARD_STATE_BUSY = 0x24U, HAL_SMARTCARD_STATE_BUSY_TX = 0x21U, HAL_SMARTCARD_STATE_BUSY_RX = 0x22U, HAL_SMARTCARD_STATE_BUSY_TX_RX = 0x23U, HAL_SMARTCARD_STATE_TIMEOUT = 0xA0U, HAL_SMARTCARD_STATE_ERROR = 0xE0U } |
HAL SMARTCARD State structures definition. More... | |
Header file of SMARTCARD HAL module.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32f4xx_hal_smartcard.h.