Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

HAL SMARTCARD Generic Driver

UM1725

54 HAL SMARTCARD Generic Driver

54.1SMARTCARD Firmware driver registers structures

54.1.1SMARTCARD_InitTypeDef

Data Fields

uint32_t BaudRate

uint32_t WordLength

uint32_t StopBits

uint32_t Parity

uint32_t Mode

uint32_t CLKPolarity

uint32_t CLKPhase

uint32_t CLKLastBit

uint32_t Prescaler

uint32_t GuardTime

uint32_t NACKState

Field Documentation

uint32_t SMARTCARD_InitTypeDef::BaudRate

This member configures the SmartCard communication baud rate. The baud rate is computed using the following formula:IntegerDivider = ((PCLKx) / (8 * (hirda- >Init.BaudRate)))FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 8)

+ 0.5

uint32_t SMARTCARD_InitTypeDef::WordLength

Specifies the number of data bits transmitted or received in a frame. This parameter can be a value of SMARTCARD_Word_Length

uint32_t SMARTCARD_InitTypeDef::StopBits

Specifies the number of stop bits transmitted. This parameter can be a value of

SMARTCARD_Stop_Bits

uint32_t SMARTCARD_InitTypeDef::Parity

Specifies the parity mode. This parameter can be a value of SMARTCARD_Parity Note:When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).

uint32_t SMARTCARD_InitTypeDef::Mode

Specifies whether the Receive or Transmit mode is enabled or disabled. This parameter can be a value of SMARTCARD_Mode

uint32_t SMARTCARD_InitTypeDef::CLKPolarity

Specifies the steady state of the serial clock. This parameter can be a value of

SMARTCARD_Clock_Polarity

uint32_t SMARTCARD_InitTypeDef::CLKPhase

Specifies the clock transition on which the bit capture is made. This parameter can be

a value of SMARTCARD_Clock_Phase

uint32_t SMARTCARD_InitTypeDef::CLKLastBit

Specifies whether the clock pulse corresponding to the last transmitted data bit (MSB)

722/900

DOCID025834 Rev 2

UM1725

HAL SMARTCARD Generic Driver

has to be output on the SCLK pin in synchronous mode. This parameter can be a value of SMARTCARD_Last_Bit

uint32_t SMARTCARD_InitTypeDef::Prescaler

Specifies the SmartCard Prescaler value used for dividing the system clock to provide the smartcard clock This parameter can be a value of SMARTCARD_Prescaler

uint32_t SMARTCARD_InitTypeDef::GuardTime

Specifies the SmartCard Guard Time value in terms of number of baud clocks The value given in the register (5 significant bits) is multiplied by 2 to give the division factor of the source clock frequency

uint32_t SMARTCARD_InitTypeDef::NACKState

Specifies the SmartCard NACK Transmission state. This parameter can be a value of

SmartCard_NACK_State

54.1.2SMARTCARD_HandleTypeDef

Data Fields

USART_TypeDef * Instance

SMARTCARD_InitTypeDef Init

uint8_t * pTxBuffPtr

uint16_t TxXferSize

uint16_t TxXferCount

uint8_t * pRxBuffPtr

uint16_t RxXferSize

uint16_t RxXferCount

DMA_HandleTypeDef * hdmatx

DMA_HandleTypeDef * hdmarx

HAL_LockTypeDef Lock

__IO HAL_SMARTCARD_StateTypeDef State

__IO uint32_t ErrorCode

Field Documentation

USART_TypeDef* SMARTCARD_HandleTypeDef::Instance

SMARTCARD_InitTypeDef SMARTCARD_HandleTypeDef::Init

uint8_t* SMARTCARD_HandleTypeDef::pTxBuffPtr

uint16_t SMARTCARD_HandleTypeDef::TxXferSize

uint16_t SMARTCARD_HandleTypeDef::TxXferCount

uint8_t* SMARTCARD_HandleTypeDef::pRxBuffPtr

uint16_t SMARTCARD_HandleTypeDef::RxXferSize

uint16_t SMARTCARD_HandleTypeDef::RxXferCount

DMA_HandleTypeDef* SMARTCARD_HandleTypeDef::hdmatx

DMA_HandleTypeDef* SMARTCARD_HandleTypeDef::hdmarx

HAL_LockTypeDef SMARTCARD_HandleTypeDef::Lock

__IO HAL_SMARTCARD_StateTypeDef SMARTCARD_HandleTypeDef::State

__IO uint32_t SMARTCARD_HandleTypeDef::ErrorCode

DOCID025834 Rev 2

723/900

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]