TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Initialization and de-initialization functions

Initialization and de-initialization functions
[SMARTCARD Exported Functions]

Initialization and Configuration functions. More...

Functions

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.

Detailed Description

Initialization and Configuration functions.

  ===============================================================================
              ##### Initialization and Configuration functions #####
  ===============================================================================
  [..]
  This subsection provides a set of functions allowing to initialize the USARTx
  associated to the SmartCard.
  (+) These parameters can be configured:
      (++) Baud Rate
      (++) Parity: parity should be enabled, frame Length is fixed to 8 bits plus parity
      (++) Receiver/transmitter modes
      (++) Synchronous mode (and if enabled, phase, polarity and last bit parameters)
      (++) Prescaler value
      (++) Guard bit time
      (++) NACK enabling or disabling on transmission error

  (+) The following advanced features can be configured as well:
      (++) TX and/or RX pin level inversion
      (++) data logical level inversion
      (++) RX and TX pins swap
      (++) RX overrun detection disabling
      (++) DMA disabling on RX error
      (++) MSB first on communication line
      (++) Time out enabling (and if activated, timeout value)
      (++) Block length
      (++) Auto-retry counter
  [..]
  The HAL_SMARTCARD_Init() API follows the USART synchronous configuration procedures
  (details for the procedures are available in reference manual).

The USART frame format is given in the following table:

Table 1. USART frame format. +---------------------------------------------------------------+ | M1M0 bits | PCE bit | USART frame | |-----------------------|---------------------------------------| | 01 | 1 | | SB | 8 bit data | PB | STB | | +---------------------------------------------------------------+


Function Documentation

HAL_StatusTypeDef HAL_SMARTCARD_DeInit ( SMARTCARD_HandleTypeDef *  hsmartcard )

DeInitialize the SMARTCARD peripheral.

Parameters:
hsmartcard,:Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values:
HALstatus

Definition at line 308 of file stm32l4xx_hal_smartcard.c.

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.

Parameters:
hsmartcard,:Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values:
HALstatus

Definition at line 246 of file stm32l4xx_hal_smartcard.c.

__weak void HAL_SMARTCARD_MspDeInit ( SMARTCARD_HandleTypeDef *  hsmartcard )

DeInitialize the SMARTCARD MSP.

Parameters:
hsmartcard,:Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values:
None

Definition at line 365 of file stm32l4xx_hal_smartcard.c.

__weak void HAL_SMARTCARD_MspInit ( SMARTCARD_HandleTypeDef *  hsmartcard )

Initialize the SMARTCARD MSP.

Parameters:
hsmartcard,:Pointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values:
None

Definition at line 349 of file stm32l4xx_hal_smartcard.c.