Classes | Macros | Typedefs | Enumerations | Functions
stm32f7xx_hal_smartcard.h File Reference

Header file of SMARTCARD HAL module. More...

#include "stm32f7xx_hal_def.h"
#include "stm32f7xx_hal_smartcard_ex.h"
Include dependency graph for stm32f7xx_hal_smartcard.h:

Go to the source code of this file.

Classes

struct  __SMARTCARD_HandleTypeDef
 SMARTCARD handle Structure definition. More...
 
struct  SMARTCARD_AdvFeatureInitTypeDef
 SMARTCARD advanced features initalization structure definition. More...
 
struct  SMARTCARD_InitTypeDef
 SMARTCARD Init Structure definition. More...
 

Macros

#define __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__)   __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_FEF)
 Clear the SMARTCARD FE pending flag. More...
 
#define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ICR = (__FLAG__))
 Clear the specified SMARTCARD pending flag. More...
 
#define __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__)   __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_IDLEF)
 Clear the SMARTCARD IDLE pending flag. More...
 
#define __HAL_SMARTCARD_CLEAR_IT(__HANDLE__, __IT_CLEAR__)   ((__HANDLE__)->Instance->ICR |= (uint32_t)(__IT_CLEAR__))
 Clear the specified SMARTCARD ISR flag, in setting the proper ICR register flag. More...
 
#define __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__)   __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_NEF)
 Clear the SMARTCARD NE pending flag. More...
 
#define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__)   __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_OREF)
 Clear the SMARTCARD ORE pending flag. More...
 
#define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__)   __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_PEF)
 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_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__)
 Flush the Smartcard Data registers. More...
 
#define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
 Check whether the specified Smartcard flag is set or not. More...
 
#define __HAL_SMARTCARD_GET_IT(__HANDLE__, __INTERRUPT__)
 Check whether the specified SmartCard interrupt has occurred or not. More...
 
#define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified SmartCard interrupt source is enabled or not. More...
 
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)
 Disable the SMARTCARD one bit sample method. More...
 
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
 Enable the SMARTCARD one bit sample method. More...
 
#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__)
 Reset SMARTCARD handle states. More...
 
#define __HAL_SMARTCARD_SEND_REQ(__HANDLE__, __REQ__)   ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
 Set a specific SMARTCARD request flag. More...
 
#define HAL_SMARTCARD_ERROR_DMA   ((uint32_t)0x00000010U)
 
#define HAL_SMARTCARD_ERROR_FE   ((uint32_t)0x00000004U)
 
#define HAL_SMARTCARD_ERROR_NE   ((uint32_t)0x00000002U)
 
#define HAL_SMARTCARD_ERROR_NONE   ((uint32_t)0x00000000U)
 
#define HAL_SMARTCARD_ERROR_ORE   ((uint32_t)0x00000008U)
 
#define HAL_SMARTCARD_ERROR_PE   ((uint32_t)0x00000001U)
 
#define HAL_SMARTCARD_ERROR_RTO   ((uint32_t)0x00000020U)
 
#define HAL_SMARTCARD_STATE_BUSY   0x00000024U
 
#define HAL_SMARTCARD_STATE_BUSY_RX   0x00000022U
 
#define HAL_SMARTCARD_STATE_BUSY_TX   0x00000021U
 
#define HAL_SMARTCARD_STATE_BUSY_TX_RX   0x00000023U
 
#define HAL_SMARTCARD_STATE_ERROR   0x000000E0U
 
#define HAL_SMARTCARD_STATE_READY   0x00000020U
 
#define HAL_SMARTCARD_STATE_RESET   0x00000000U
 
#define HAL_SMARTCARD_STATE_TIMEOUT   0x000000A0U
 
#define IS_SMARTCARD_ADVFEATURE_DATAINV(__DATAINV__)
 Ensure that SMARTCARD frame data inversion setting is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(__DMA__)
 Ensure that SMARTCARD DMA enabling or disabling on error setting is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_INIT(__INIT__)
 Ensure that SMARTCARD advanced features initialization is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_MSBFIRST(__MSBFIRST__)
 Ensure that SMARTCARD frame MSB first setting is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_RXINV(__RXINV__)
 Ensure that SMARTCARD frame RX inversion setting is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_SWAP(__SWAP__)
 Ensure that SMARTCARD frame RX/TX pins swap setting is valid. More...
 
#define IS_SMARTCARD_ADVFEATURE_TXINV(__TXINV__)
 Ensure that SMARTCARD frame TX inversion setting is valid. More...
 
#define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__)   ((__COUNT__) <= 0x7U)
 Check the SMARTCARD autoretry counter value. More...
 
#define IS_SMARTCARD_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 13500001U)
 Check the Baud rate range. More...
 
#define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__)   ((__LENGTH__) <= 0xFFU)
 Check the block length range. More...
 
#define IS_SMARTCARD_LASTBIT(__LASTBIT__)
 Ensure that SMARTCARD frame last bit clock pulse setting is valid. More...
 
#define IS_SMARTCARD_MODE(__MODE__)   ((((__MODE__) & 0xFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
 Ensure that SMARTCARD communication mode is valid. More...
 
#define IS_SMARTCARD_NACK(__NACK__)
 Ensure that SMARTCARD NACK transmission setting is valid. More...
 
#define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__)
 Ensure that SMARTCARD frame sampling is valid. More...
 
#define IS_SMARTCARD_OVERRUN(__OVERRUN__)
 Ensure that SMARTCARD frame overrun setting is valid. More...
 
#define IS_SMARTCARD_PARITY(__PARITY__)
 Ensure that SMARTCARD frame parity is valid. More...
 
#define IS_SMARTCARD_PHASE(__CPHA__)   (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))
 Ensure that SMARTCARD frame phase is valid. More...
 
#define IS_SMARTCARD_POLARITY(__CPOL__)
 Ensure that SMARTCARD frame polarity is valid. More...
 
#define IS_SMARTCARD_REQUEST_PARAMETER(__PARAM__)
 Ensure that SMARTCARD request parameter is valid. More...
 
#define IS_SMARTCARD_STOPBITS(__STOPBITS__)
 Ensure that SMARTCARD frame number of stop bits is valid. More...
 
#define IS_SMARTCARD_TIMEOUT(__TIMEOUT__)
 Ensure that SMARTCARD receiver timeout setting is valid. More...
 
#define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__)   ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
 Check the receiver timeout value. More...
 
#define IS_SMARTCARD_WORD_LENGTH(__LENGTH__)   ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)
 Ensure that SMARTCARD frame length is valid. More...
 
#define SMARTCARD_ADVFEATURE_DATAINV_DISABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_DATAINV_ENABLE   USART_CR2_DATAINV
 
#define SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR   USART_CR3_DDRE
 
#define SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR   0x00000000U
 
#define SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE   USART_CR2_MSBFIRST
 
#define SMARTCARD_ADVFEATURE_OVERRUN_DISABLE   USART_CR3_OVRDIS
 
#define SMARTCARD_ADVFEATURE_OVERRUN_ENABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_RXINV_DISABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_RXINV_ENABLE   USART_CR2_RXINV
 
#define SMARTCARD_ADVFEATURE_SWAP_DISABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_SWAP_ENABLE   USART_CR2_SWAP
 
#define SMARTCARD_ADVFEATURE_TXINV_DISABLE   0x00000000U
 
#define SMARTCARD_ADVFEATURE_TXINV_ENABLE   USART_CR2_TXINV
 
#define SMARTCARD_CR_MASK   0x00E0U
 
#define SMARTCARD_CR_POS   5U
 
#define SMARTCARD_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__)
 Report the SMARTCARD clock source. More...
 
#define SMARTCARD_ISR_MASK   0x1F00U
 
#define SMARTCARD_ISR_POS   8U
 
#define SMARTCARD_IT_MASK   0x001FU
 
#define SMARTCARD_LASTBIT_DISABLE   0x00000000U
 
#define SMARTCARD_LASTBIT_ENABLE   USART_CR2_LBCL
 
#define SMARTCARD_MODE_RX   USART_CR1_RE
 
#define SMARTCARD_MODE_TX   USART_CR1_TE
 
#define SMARTCARD_MODE_TX_RX   (USART_CR1_TE |USART_CR1_RE)
 
#define SMARTCARD_NACK_DISABLE   0x00000000U
 
#define SMARTCARD_NACK_ENABLE   USART_CR3_NACK
 
#define SMARTCARD_ONE_BIT_SAMPLE_DISABLE   0x00000000U
 
#define SMARTCARD_ONE_BIT_SAMPLE_ENABLE   USART_CR3_ONEBIT
 
#define SMARTCARD_PARITY_EVEN   USART_CR1_PCE
 
#define SMARTCARD_PARITY_ODD   (USART_CR1_PCE | USART_CR1_PS)
 
#define SMARTCARD_PHASE_1EDGE   0x00000000U
 
#define SMARTCARD_PHASE_2EDGE   USART_CR2_CPHA
 
#define SMARTCARD_POLARITY_HIGH   USART_CR2_CPOL
 
#define SMARTCARD_POLARITY_LOW   0x00000000U
 
#define SMARTCARD_RXDATA_FLUSH_REQUEST   USART_RQR_RXFRQ
 
#define SMARTCARD_STOPBITS_0_5   USART_CR2_STOP_0
 
#define SMARTCARD_STOPBITS_1_5   USART_CR2_STOP
 
#define SMARTCARD_TIMEOUT_DISABLE   0x00000000U
 
#define SMARTCARD_TIMEOUT_ENABLE   USART_CR2_RTOEN
 
#define SMARTCARD_TXDATA_FLUSH_REQUEST   USART_RQR_TXFRQ
 
#define SMARTCARD_WORDLENGTH_9B   USART_CR1_M0
 

Typedefs

typedef uint32_t HAL_SMARTCARD_StateTypeDef
 HAL SMARTCARD State definition. More...
 
typedef struct __SMARTCARD_HandleTypeDef SMARTCARD_HandleTypeDef
 SMARTCARD handle Structure definition. More...
 

Enumerations

enum  SMARTCARD_ClockSourceTypeDef {
  SMARTCARD_CLOCKSOURCE_PCLK1 = 0x00U, SMARTCARD_CLOCKSOURCE_PCLK2 = 0x01U, SMARTCARD_CLOCKSOURCE_HSI = 0x02U, SMARTCARD_CLOCKSOURCE_SYSCLK = 0x04U,
  SMARTCARD_CLOCKSOURCE_LSE = 0x08U, SMARTCARD_CLOCKSOURCE_UNDEFINED = 0x10U
}
 SMARTCARD clock sources. More...
 

Functions

HAL_StatusTypeDef HAL_SMARTCARD_Abort (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_Abort_IT (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_AbortCpltCallback (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_AbortReceive_IT (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_AbortReceiveCpltCallback (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_AbortTransmit_IT (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_AbortTransmitCpltCallback (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_DeInit (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_ErrorCallback (SMARTCARD_HandleTypeDef *hsc)
 
uint32_t HAL_SMARTCARD_GetError (SMARTCARD_HandleTypeDef *hsmartcard)
 
HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState (SMARTCARD_HandleTypeDef *hsmartcard)
 
HAL_StatusTypeDef HAL_SMARTCARD_Init (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_IRQHandler (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_MspDeInit (SMARTCARD_HandleTypeDef *hsc)
 
void HAL_SMARTCARD_MspInit (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_Receive (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
 
void HAL_SMARTCARD_RxCpltCallback (SMARTCARD_HandleTypeDef *hsc)
 
HAL_StatusTypeDef HAL_SMARTCARD_Transmit (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout)
 
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
 
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT (SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size)
 
void HAL_SMARTCARD_TxCpltCallback (SMARTCARD_HandleTypeDef *hsc)
 

Detailed Description

Header file of SMARTCARD HAL module.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

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 stm32f7xx_hal_smartcard.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:02