L4 HAL Drivers
IO operation functions
[SMARTCARD Exported Functions]
SMARTCARD Transmit and Receive functions. More...
Functions | |
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. | |
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. |
Detailed Description
SMARTCARD Transmit and Receive functions.
============================================================================== ##### IO operation functions ##### ============================================================================== [..] This subsection provides a set of functions allowing to manage the SMARTCARD data transfers. [..] Smartcard is a single wire half duplex communication protocol. The Smartcard interface is designed to support asynchronous protocol Smartcards as defined in the ISO 7816-3 standard. The USART should be configured as: (+) 8 bits plus parity: where M=1 and PCE=1 in the USART_CR1 register (+) 1.5 stop bits when transmitting and receiving: where STOP=11 in the USART_CR2 register. [..] (+) There are two modes of transfer: (++) Blocking mode: The communication is performed in polling mode. The HAL status of all data processing is returned by the same function after finishing transfer. (++) No-Blocking mode: The communication is performed using Interrupts or DMA, the relevant API's return the HAL status. The end of the data processing will be indicated through the dedicated SMARTCARD IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. (++) The HAL_SMARTCARD_TxCpltCallback(), HAL_SMARTCARD_RxCpltCallback() user callbacks will be executed respectively at the end of the Transmit or Receive process The HAL_SMARTCARD_ErrorCallback() user callback will be executed when a communication error is detected. (+) Blocking mode APIs are : (++) HAL_SMARTCARD_Transmit() (++) HAL_SMARTCARD_Receive() (+) Non Blocking mode APIs with Interrupt are : (++) HAL_SMARTCARD_Transmit_IT() (++) HAL_SMARTCARD_Receive_IT() (++) HAL_SMARTCARD_IRQHandler() (+) Non Blocking mode functions with DMA are : (++) HAL_SMARTCARD_Transmit_DMA() (++) HAL_SMARTCARD_Receive_DMA() (+) A set of Transfer Complete Callbacks are provided in non Blocking mode: (++) HAL_SMARTCARD_TxCpltCallback() (++) HAL_SMARTCARD_RxCpltCallback() (++) HAL_SMARTCARD_ErrorCallback()
Function Documentation
__weak void HAL_SMARTCARD_ErrorCallback | ( | SMARTCARD_HandleTypeDef * | hsmartcard ) |
SMARTCARD error callback.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
- Return values:
-
None
Definition at line 955 of file stm32l4xx_hal_smartcard.c.
void HAL_SMARTCARD_IRQHandler | ( | SMARTCARD_HandleTypeDef * | hsmartcard ) |
Handle SMARTCARD interrupt requests.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
- Return values:
-
None
Definition at line 839 of file stm32l4xx_hal_smartcard.c.
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.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be received. Timeout : Timeout duration.
- Return values:
-
HAL status
Definition at line 521 of file stm32l4xx_hal_smartcard.c.
HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA | ( | SMARTCARD_HandleTypeDef * | hsmartcard, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in DMA mode.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be received.
- Note:
- The SMARTCARD-associated USART parity is enabled (PCE = 1), the received data contain the parity bit (MSB position).
- Return values:
-
HAL status
Definition at line 780 of file stm32l4xx_hal_smartcard.c.
HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT | ( | SMARTCARD_HandleTypeDef * | hsmartcard, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in interrupt mode.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be received.
- Return values:
-
HAL status
Definition at line 650 of file stm32l4xx_hal_smartcard.c.
__weak void HAL_SMARTCARD_RxCpltCallback | ( | SMARTCARD_HandleTypeDef * | hsmartcard ) |
Rx Transfer completed callback.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
- Return values:
-
None
Definition at line 942 of file stm32l4xx_hal_smartcard.c.
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.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be sent. Timeout : Timeout duration.
- Return values:
-
HAL status
Definition at line 431 of file stm32l4xx_hal_smartcard.c.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA | ( | SMARTCARD_HandleTypeDef * | hsmartcard, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Send an amount of data in DMA mode.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be sent.
- Return values:
-
HAL status
Definition at line 705 of file stm32l4xx_hal_smartcard.c.
HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT | ( | SMARTCARD_HandleTypeDef * | hsmartcard, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Send an amount of data in interrupt mode.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module. pData,: pointer to data buffer. Size,: amount of data to be sent.
- Return values:
-
HAL status
Definition at line 587 of file stm32l4xx_hal_smartcard.c.
__weak void HAL_SMARTCARD_TxCpltCallback | ( | SMARTCARD_HandleTypeDef * | hsmartcard ) |
Tx Transfer completed callback.
- Parameters:
-
hsmartcard,: Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
- Return values:
-
None
Definition at line 929 of file stm32l4xx_hal_smartcard.c.
Generated on Tue Jul 12 2022 10:58:18 by 1.7.2