STM32L486xx HAL User Manual
|
SMARTCARD HAL module driver. This file provides firmware functions to manage the following functionalities of the SMARTCARD peripheral: + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State and Error functions. More...
#include "stm32l4xx_hal.h"
Go to the source code of this file.
Defines | |
#define | SMARTCARD_TEACK_REACK_TIMEOUT 1000U |
#define | USART_CR1_FIELDS |
#define | USART_CR2_CLK_FIELDS |
#define | USART_CR2_FIELDS ((uint32_t)(USART_CR2_RTOEN | USART_CR2_CLK_FIELDS | USART_CR2_STOP)) |
#define | USART_CR3_FIELDS ((uint32_t)(USART_CR3_ONEBIT | USART_CR3_NACK | USART_CR3_SCARCNT)) |
#define | USART_BRR_MIN 0x10U |
#define | USART_BRR_MAX 0x0000FFFFU |
Functions | |
void | SMARTCARD_InitCallbacksToDefault (SMARTCARD_HandleTypeDef *hsmartcard) |
Initialize the callbacks to their default values. | |
static HAL_StatusTypeDef | SMARTCARD_SetConfig (SMARTCARD_HandleTypeDef *hsmartcard) |
Configure the SMARTCARD associated USART peripheral. | |
static void | SMARTCARD_AdvFeatureConfig (SMARTCARD_HandleTypeDef *hsmartcard) |
Configure the SMARTCARD associated USART peripheral advanced features. | |
static HAL_StatusTypeDef | SMARTCARD_CheckIdleState (SMARTCARD_HandleTypeDef *hsmartcard) |
Check the SMARTCARD Idle State. | |
static HAL_StatusTypeDef | SMARTCARD_WaitOnFlagUntilTimeout (SMARTCARD_HandleTypeDef *hsmartcard, uint32_t Flag, FlagStatus Status, uint32_t Tickstart, uint32_t Timeout) |
Handle SMARTCARD Communication Timeout. | |
static void | SMARTCARD_EndTxTransfer (SMARTCARD_HandleTypeDef *hsmartcard) |
End ongoing Tx transfer on SMARTCARD peripheral (following error detection or Transmit completion). | |
static void | SMARTCARD_EndRxTransfer (SMARTCARD_HandleTypeDef *hsmartcard) |
End ongoing Rx transfer on UART peripheral (following error detection or Reception completion). | |
static void | SMARTCARD_DMATransmitCplt (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD transmit process complete callback. | |
static void | SMARTCARD_DMAReceiveCplt (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD receive process complete callback. | |
static void | SMARTCARD_DMAError (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD communication error callback. | |
static void | SMARTCARD_DMAAbortOnError (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD communication abort callback, when initiated by HAL services on Error (To be called at end of DMA Abort procedure following error occurrence). | |
static void | SMARTCARD_DMATxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD Tx communication abort callback, when initiated by user (To be called at end of DMA Tx Abort procedure following user abort request). | |
static void | SMARTCARD_DMARxAbortCallback (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD Rx communication abort callback, when initiated by user (To be called at end of DMA Rx Abort procedure following user abort request). | |
static void | SMARTCARD_DMATxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD Tx communication abort callback, when initiated by user by a call to HAL_SMARTCARD_AbortTransmit_IT API (Abort only Tx transfer) (This callback is executed at end of DMA Tx Abort procedure following user abort request, and leads to user Tx Abort Complete callback execution). | |
static void | SMARTCARD_DMARxOnlyAbortCallback (DMA_HandleTypeDef *hdma) |
DMA SMARTCARD Rx communication abort callback, when initiated by user by a call to HAL_SMARTCARD_AbortReceive_IT API (Abort only Rx transfer) (This callback is executed at end of DMA Rx Abort procedure following user abort request, and leads to user Rx Abort Complete callback execution). | |
static void | SMARTCARD_TxISR (SMARTCARD_HandleTypeDef *hsmartcard) |
Send an amount of data in non-blocking mode. | |
static void | SMARTCARD_EndTransmit_IT (SMARTCARD_HandleTypeDef *hsmartcard) |
Wrap up transmission in non-blocking mode. | |
static void | SMARTCARD_RxISR (SMARTCARD_HandleTypeDef *hsmartcard) |
Receive an amount of data in non-blocking mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Init (SMARTCARD_HandleTypeDef *hsmartcard) |
Initialize the SMARTCARD mode according to the specified parameters in the SMARTCARD_HandleTypeDef and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_SMARTCARD_DeInit (SMARTCARD_HandleTypeDef *hsmartcard) |
DeInitialize the SMARTCARD peripheral. | |
__weak void | HAL_SMARTCARD_MspInit (SMARTCARD_HandleTypeDef *hsmartcard) |
Initialize the SMARTCARD MSP. | |
__weak void | HAL_SMARTCARD_MspDeInit (SMARTCARD_HandleTypeDef *hsmartcard) |
DeInitialize the SMARTCARD MSP. | |
HAL_StatusTypeDef | HAL_SMARTCARD_RegisterCallback (SMARTCARD_HandleTypeDef *hsmartcard, HAL_SMARTCARD_CallbackIDTypeDef CallbackID, pSMARTCARD_CallbackTypeDef pCallback) |
Register a User SMARTCARD Callback To be used instead of the weak predefined callback. | |
HAL_StatusTypeDef | HAL_SMARTCARD_UnRegisterCallback (SMARTCARD_HandleTypeDef *hsmartcard, HAL_SMARTCARD_CallbackIDTypeDef CallbackID) |
Unregister an SMARTCARD callback SMARTCARD callback is redirected to the weak predefined callback. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Transmit (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size, uint32_t Timeout) |
Send an amount of data in blocking mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Receive (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size, uint32_t Timeout) |
Receive an amount of data in blocking mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Transmit_IT (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size) |
Send an amount of data in interrupt mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Receive_IT (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size) |
Receive an amount of data in interrupt mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Transmit_DMA (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size) |
Send an amount of data in DMA mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Receive_DMA (SMARTCARD_HandleTypeDef *hsmartcard, uint8_t *pData, uint16_t Size) |
Receive an amount of data in DMA mode. | |
HAL_StatusTypeDef | HAL_SMARTCARD_Abort (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing transfers (blocking mode). | |
HAL_StatusTypeDef | HAL_SMARTCARD_AbortTransmit (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing Transmit transfer (blocking mode). | |
HAL_StatusTypeDef | HAL_SMARTCARD_AbortReceive (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing Receive transfer (blocking mode). | |
HAL_StatusTypeDef | HAL_SMARTCARD_Abort_IT (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing transfers (Interrupt mode). | |
HAL_StatusTypeDef | HAL_SMARTCARD_AbortTransmit_IT (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing Transmit transfer (Interrupt mode). | |
HAL_StatusTypeDef | HAL_SMARTCARD_AbortReceive_IT (SMARTCARD_HandleTypeDef *hsmartcard) |
Abort ongoing Receive transfer (Interrupt mode). | |
void | HAL_SMARTCARD_IRQHandler (SMARTCARD_HandleTypeDef *hsmartcard) |
Handle SMARTCARD interrupt requests. | |
__weak void | HAL_SMARTCARD_TxCpltCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
Tx Transfer completed callback. | |
__weak void | HAL_SMARTCARD_RxCpltCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
Rx Transfer completed callback. | |
__weak void | HAL_SMARTCARD_ErrorCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
SMARTCARD error callback. | |
__weak void | HAL_SMARTCARD_AbortCpltCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
SMARTCARD Abort Complete callback. | |
__weak void | HAL_SMARTCARD_AbortTransmitCpltCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
SMARTCARD Abort Complete callback. | |
__weak void | HAL_SMARTCARD_AbortReceiveCpltCallback (SMARTCARD_HandleTypeDef *hsmartcard) |
SMARTCARD Abort Receive Complete callback. | |
HAL_SMARTCARD_StateTypeDef | HAL_SMARTCARD_GetState (SMARTCARD_HandleTypeDef *hsmartcard) |
Return the SMARTCARD handle state. | |
uint32_t | HAL_SMARTCARD_GetError (SMARTCARD_HandleTypeDef *hsmartcard) |
Return the SMARTCARD handle error code. |
SMARTCARD HAL module driver. This file provides firmware functions to manage the following functionalities of the SMARTCARD peripheral: + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State and Error functions.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l4xx_hal_smartcard.c.