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

UM1725

HAL FMPI2C Generic Driver

23.3FMPI2C Firmware driver defines

23.3.1FMPI2C

FMPI2C addressing mode

FMPI2C_ADDRESSINGMODE_7BIT

FMPI2C_ADDRESSINGMODE_10BIT

FMPI2C dual addressing mode

FMPI2C_DUALADDRESS_DISABLE

FMPI2C_DUALADDRESS_ENABLE

FMPI2C Exported Macros

__HAL_FMPI2C_RESET_HANDLE_STATE Description:

Reset FMPI2C handle state.

Parameters:

__HANDLE__: specifies the FMPI2C Handle. This parameter can be FMPI2C where x: 1 or 2 to select the FMPI2C peripheral.

Return value:

 

 

None

__HAL_FMPI2C_ENABLE_IT

Description:

 

Enables or disables the specified

 

 

FMPI2C interrupts.

 

Parameters:

 

 

__HANDLE__: specifies the FMPI2C

 

 

Handle. This parameter can be

 

 

FMPI2C where x: 1 or 2 to select the

 

 

FMPI2C peripheral.

 

 

__INTERRUPT__: specifies the

 

 

interrupt source to enable or disable.

 

 

This parameter can be one of the

 

 

following values:

 

 

FMPI2C_IT_ERRI: Errors interrupt

 

 

 

enable

 

 

 

FMPI2C_IT_TCI: Transfer

 

 

 

complete interrupt enable

 

 

 

FMPI2C_IT_STOPI: STOP

 

 

 

detection interrupt enable

 

 

 

FMPI2C_IT_NACKI: NACK

 

 

 

received interrupt enable

 

 

 

FMPI2C_IT_ADDRI: Address

 

 

 

match interrupt enable

 

 

FMPI2C_IT_RXI: RX interrupt

 

 

 

enable

 

 

FMPI2C_IT_TXI: TX interrupt

 

 

 

enable

DOCID025834 Rev 2

 

341/900

HAL FMPI2C Generic Driver

 

 

UM1725

 

 

Return value:

 

 

 

None

 

__HAL_FMPI2C_DISABLE_IT

 

 

 

 

__HAL_FMPI2C_GET_IT_SOURCE

Description:

 

 

Checks if the specified FMPI2C

 

 

 

interrupt source is enabled or disabled.

 

 

Parameters:

 

 

 

__HANDLE__: specifies the FMPI2C

 

 

 

Handle. This parameter can be

 

 

 

FMPI2C where x: 1 or 2 to select the

 

 

 

FMPI2C peripheral.

 

 

 

__INTERRUPT__: specifies the

 

 

 

FMPI2C interrupt source to check. This

 

 

 

parameter can be one of the following

 

 

 

values:

 

 

 

FMPI2C_IT_ERRI: Errors interrupt

 

 

 

 

enable

 

 

 

 

FMPI2C_IT_TCI: Transfer

 

 

 

 

complete interrupt enable

 

 

 

 

FMPI2C_IT_STOPI: STOP

 

 

 

 

detection interrupt enable

 

 

 

 

FMPI2C_IT_NACKI: NACK

 

 

 

 

received interrupt enable

 

 

 

 

FMPI2C_IT_ADDRI: Address

 

 

 

 

match interrupt enable

 

 

 

FMPI2C_IT_RXI: RX interrupt

 

 

 

 

enable

 

 

 

FMPI2C_IT_TXI: TX interrupt

 

 

 

 

enable

 

 

Return value:

 

 

The: new state of __IT__ (TRUE or

 

 

 

FALSE).

 

__HAL_FMPI2C_GET_FLAG

Description:

 

 

Checks whether the specified FMPI2C

 

 

 

flag is set or not.

 

 

Parameters:

 

 

 

__HANDLE__: specifies the FMPI2C

 

 

 

Handle. This parameter can be

 

 

 

FMPI2C where x: 1 or 2 to select the

 

 

 

FMPI2C peripheral.

 

 

__FLAG__: specifies the flag to check.

 

 

 

This parameter can be one of the

 

 

 

following values:

 

 

 

 

FMPI2C_FLAG_TXE: Transmit

 

 

 

 

data register empty

 

 

 

 

FMPI2C_FLAG_TXIS: Transmit

 

 

 

 

interrupt status

 

 

 

 

FMPI2C_FLAG_RXNE: Receive

342/900

DOCID025834 Rev 2

 

 

UM1725

HAL FMPI2C Generic Driver

 

data register not empty

 

FMPI2C_FLAG_ADDR: Address

 

matched (slave mode)

 

FMPI2C_FLAG_AF: Acknowledge

 

failure received flag

 

FMPI2C_FLAG_STOPF: STOP

 

detection flag

 

FMPI2C_FLAG_TC: Transfer

 

complete (master mode)

 

FMPI2C_FLAG_TCR: Transfer

 

complete reload

FMPI2C_FLAG_BERR: Bus error

 

FMPI2C_FLAG_ARLO: Arbitration

 

lost

FMPI2C_FLAG_OVR:

 

Overrun/Underrun

 

FMPI2C_FLAG_PECERR: PEC

 

error in reception

FMPI2C_FLAG_TIMEOUT:

 

Timeout or Tlow detection flag

 

FMPI2C_FLAG_ALERT: SMBus

 

alert

FMPI2C_FLAG_BUSY: Bus busy

 

FMPI2C_FLAG_DIR: Transfer

 

direction (slave mode)

 

Return value:

 

The: new state of __FLAG__ (TRUE or

 

FALSE).

__HAL_FMPI2C_CLEAR_FLAG

Description:

 

Clears the FMPI2C pending flags which

 

are cleared by writing 1 in a specific bit.

 

Parameters:

 

__HANDLE__: specifies the FMPI2C

 

Handle. This parameter can be

 

FMPI2C where x: 1 or 2 to select the

 

FMPI2C peripheral.

 

__FLAG__: specifies the flag to clear.

 

This parameter can be any combination

 

of the following values:

 

 

FMPI2C_FLAG_ADDR: Address

 

 

matched (slave mode)

 

 

FMPI2C_FLAG_AF: Acknowledge

 

 

failure received flag

 

 

FMPI2C_FLAG_STOPF: STOP

 

 

detection flag

 

FMPI2C_FLAG_BERR: Bus error

 

 

FMPI2C_FLAG_ARLO: Arbitration

 

 

lost

 

FMPI2C_FLAG_OVR:

 

 

Overrun/Underrun

 

 

FMPI2C_FLAG_PECERR: PEC

DOCID025834 Rev 2

343/900

HAL FMPI2C Generic Driver

UM1725

 

error in reception

FMPI2C_FLAG_TIMEOUT:

 

Timeout or Tlow detection flag

 

FMPI2C_FLAG_ALERT: SMBus

 

alert

Return value:

None

__HAL_FMPI2C_ENABLE

__HAL_FMPI2C_DISABLE __HAL_FMPI2C_RESET_CR2 __HAL_FMPI2C_MEM_ADD_MSB __HAL_FMPI2C_MEM_ADD_LSB __HAL_FMPI2C_GENERATE_START IS_FMPI2C_OWN_ADDRESS1 IS_FMPI2C_OWN_ADDRESS2

FMPI2C Flag definition

FMPI2C_FLAG_TXE

FMPI2C_FLAG_TXIS

FMPI2C_FLAG_RXNE

FMPI2C_FLAG_ADDR

FMPI2C_FLAG_AF

FMPI2C_FLAG_STOPF

FMPI2C_FLAG_TC

FMPI2C_FLAG_TCR

FMPI2C_FLAG_BERR

FMPI2C_FLAG_ARLO

FMPI2C_FLAG_OVR

FMPI2C_FLAG_PECERR

FMPI2C_FLAG_TIMEOUT

FMPI2C_FLAG_ALERT

FMPI2C_FLAG_BUSY

FMPI2C_FLAG_DIR

FMPI2C general call addressing mode

FMPI2C_GENERALCALL_DISABLE

FMPI2C_GENERALCALL_ENABLE

FMPI2C Interrupt configuration definition

FMPI2C_IT_ERRI

FMPI2C_IT_TCI

344/900

DOCID025834 Rev 2

UM1725

HAL FMPI2C Generic Driver

FMPI2C_IT_STOPI

 

FMPI2C_IT_NACKI

 

FMPI2C_IT_ADDRI

 

FMPI2C_IT_RXI

 

FMPI2C_IT_TXI

 

FMPI2C Memory Address Size

 

FMPI2C_MEMADD_SIZE_8BIT

 

FMPI2C_MEMADD_SIZE_16BIT

 

FMPI2C nostretch mode

 

FMPI2C_NOSTRETCH_DISABLE

 

FMPI2C_NOSTRETCH_ENABLE

 

FMPI2C own address2 masks

 

FMPI2C_OA2_NOMASK

 

FMPI2C_OA2_MASK01

 

FMPI2C_OA2_MASK02

 

FMPI2C_OA2_MASK03

 

FMPI2C_OA2_MASK04

 

FMPI2C_OA2_MASK05

 

FMPI2C_OA2_MASK06

 

FMPI2C_OA2_MASK07

 

FMPI2C Private Constants

 

TIMING_CLEAR_MASK

 

FMPI2C_TIMEOUT_ADDR

 

FMPI2C_TIMEOUT_BUSY

 

FMPI2C_TIMEOUT_DIR

 

FMPI2C_TIMEOUT_RXNE

 

FMPI2C_TIMEOUT_STOPF

 

FMPI2C_TIMEOUT_TC

 

FMPI2C_TIMEOUT_TCR

 

FMPI2C_TIMEOUT_TXIS

 

FMPI2C_TIMEOUT_FLAG

 

FMPI2C_FLAG_MASK

 

FMPI2C Private Macros

 

IS_FMPI2C_ADDRESSING_MODE

 

IS_FMPI2C_DUAL_ADDRESS

 

IS_FMPI2C_OWN_ADDRESS2_MASK

 

DOCID025834 Rev 2

345/900

HAL FMPI2C Generic Driver

UM1725

IS_FMPI2C_GENERAL_CALL

IS_FMPI2C_NO_STRETCH

IS_FMPI2C_MEMADD_SIZE

IS_TRANSFER_MODE

IS_TRANSFER_REQUEST

FMPI2C ReloadEndMode definition

FMPI2C_RELOAD_MODE

FMPI2C_AUTOEND_MODE

FMPI2C_SOFTEND_MODE

FMPI2C StartStopMode definition

FMPI2C_NO_STARTSTOP

FMPI2C_GENERATE_STOP

FMPI2C_GENERATE_START_READ

FMPI2C_GENERATE_START_WRITE

346/900

DOCID025834 Rev 2

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