Functions
DMA_Management
Peripheral Driver » LL Driver » I2C » Functions

## Functions
__STATIC_INLINE void | ll_i2c_enable_dma_req_tx (i2c_regs_t *I2Cx)
| Enable DMA transmission requests. More...
__STATIC_INLINE void | ll_i2c_disable_dma_req_tx (i2c_regs_t *I2Cx)
| Disable DMA transmission requests. More...
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_dma_req_tx (i2c_regs_t *I2Cx)
| Check if DMA transmission requests are enabled or disabled. More...
__STATIC_INLINE void | ll_i2c_enable_dma_req_rx (i2c_regs_t *I2Cx)
| Enable DMA reception requests. More...
__STATIC_INLINE void | ll_i2c_disable_dma_req_rx (i2c_regs_t *I2Cx)
| Disable DMA reception requests. More...
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_dma_req_rx (i2c_regs_t *I2Cx)
| Check if DMA reception requests are enabled or disabled. More...
__STATIC_INLINE void | ll_i2c_set_dma_tx_data_level (i2c_regs_t *I2Cx, uint32_t level)
| Set level of TX FIFO that requests a DMA transmit. More...
__STATIC_INLINE uint32_t | ll_i2c_get_dma_tx_data_level (i2c_regs_t *I2Cx)
| Get level of TX FIFO that request a DMA transmit. More...
__STATIC_INLINE void | ll_i2c_set_dma_rx_data_level (i2c_regs_t *I2Cx, uint32_t level)
| Set level of RX FIFO that requests a DMA receive. More...
__STATIC_INLINE uint32_t | ll_i2c_get_dma_rx_data_level (i2c_regs_t *I2Cx)
| Get level of RX FIFO that request a DMA receive. More...
__STATIC_INLINE uint32_t | ll_i2c_dma_get_register_address (i2c_regs_t *I2Cx)
| Get the data register address used for DMA transfer. More...
__STATIC_INLINE void | ll_i2c_set_scl_stuck_at_low_timeout (i2c_regs_t *I2Cx, uint32_t timeout)
| Set scl stuck timeout time. More...
__STATIC_INLINE void | ll_i2c_set_sda_stuck_at_low_timeout (i2c_regs_t *I2Cx, uint32_t timeout)
| Set sda stuck timeout time. More...

## Detailed Description

## Function Documentation

## ◆ ll_i2c_disable_dma_req_rx()

__STATIC_INLINE void ll_i2c_disable_dma_req_rx | ( | i2c_regs_t * | I2Cx | ) |

Disable DMA reception requests.

Register|BitsName ---------------|--------------- DMA_CTRL | RX_EN

Parameters

  I2Cx | I2C instance.

Return values

  None. |

Definition at line 3400 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_disable_dma_req_tx()

__STATIC_INLINE void ll_i2c_disable_dma_req_tx | ( | i2c_regs_t * | I2Cx | ) |

Disable DMA transmission requests.

Register|BitsName ---------------|--------------- DMA_CTRL | TX_EN

Parameters

  I2Cx | I2C instance.

Return values

  None. |

Definition at line 3355 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_dma_get_register_address()

__STATIC_INLINE uint32_t ll_i2c_dma_get_register_address | ( | i2c_regs_t * | I2Cx | ) |

Get the data register address used for DMA transfer.

Register|BitsName ---------------|--------------- DATA_CMD | DAT

Parameters

  I2Cx | I2C instance

Return values

  Address | of data register

Definition at line 3500 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_enable_dma_req_rx()

__STATIC_INLINE void ll_i2c_enable_dma_req_rx | ( | i2c_regs_t * | I2Cx | ) |

Enable DMA reception requests.

Register|BitsName ---------------|--------------- DMA_CTRL | RX_EN

Parameters

  I2Cx | I2C instance.

Return values

  None. |

Definition at line 3385 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_enable_dma_req_tx()

__STATIC_INLINE void ll_i2c_enable_dma_req_tx | ( | i2c_regs_t * | I2Cx | ) |

Enable DMA transmission requests.

Register|BitsName ---------------|--------------- DMA_CTRL | TX_EN

Return values

  Value | range between 0 ~ 0x8.
  None. |

Definition at line 3340 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_get_dma_rx_data_level()

__STATIC_INLINE uint32_t ll_i2c_get_dma_rx_data_level | ( | i2c_regs_t * | I2Cx | ) |

Get level of RX FIFO that request a DMA receive.

Register|BitsName ---------------|--------------- DMA_RX_LEVEL | LEVEL

Parameters

  I2Cx | I2C instance

Return values

  Returned | value should range between 0x0 and 0x8.

Definition at line 3485 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_get_dma_tx_data_level()

__STATIC_INLINE uint32_t ll_i2c_get_dma_tx_data_level | ( | i2c_regs_t * | I2Cx | ) |

Get level of TX FIFO that request a DMA transmit.

Register|BitsName ---------------|--------------- DMA_TX_LEVEL | LEVEL

Parameters

  I2Cx | I2C instance

Return values

  Returned | value should range between 0x0 and 0x8.

Definition at line 3449 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_is_enabled_dma_req_rx()

__STATIC_INLINE uint32_t ll_i2c_is_enabled_dma_req_rx | ( | i2c_regs_t * | I2Cx | ) |

Check if DMA reception requests are enabled or disabled.

Register|BitsName ---------------|--------------- DMA_CTRL | RX_EN

Parameters

  I2Cx | I2C instance.

Return values

  State | of bit (1 or 0).

Definition at line 3415 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_is_enabled_dma_req_tx()

__STATIC_INLINE uint32_t ll_i2c_is_enabled_dma_req_tx | ( | i2c_regs_t * | I2Cx | ) |

Check if DMA transmission requests are enabled or disabled.

Register|BitsName ---------------|--------------- DMA_CTRL | TX_EN

Parameters

  I2Cx | I2C instance.

Return values

  State | of bit (1 or 0).

Definition at line 3370 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_set_dma_rx_data_level()

__STATIC_INLINE void ll_i2c_set_dma_rx_data_level | ( | i2c_regs_t * | I2Cx,
|  | uint32_t | level
| ) |  |

Set level of RX FIFO that requests a DMA receive.

Note
  The watermark level = DMARDL + 1, that is, dma_rx_req is generated when the number of valid data entries in the receive FIFO is equal to or more than this field value + 1, and RDMAE = 1. For instance, when DMARDL is 0, then dma_rx_req is asserted when 1 or more data entries are present in the receive FIFO.

Register|BitsName ---------------|--------------- DMA_RX_LEVEL | LEVEL

Parameters

  I2Cx | I2C instance
  level | This parameter should range between 0x0 and 0x8.

Return values

  None. |

Definition at line 3470 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_set_dma_tx_data_level()

__STATIC_INLINE void ll_i2c_set_dma_tx_data_level | ( | i2c_regs_t * | I2Cx,
|  | uint32_t | level
| ) |  |

Set level of TX FIFO that requests a DMA transmit.

Note
  TX data level should equal to the watermark level, that is, the dma_tx_req signal is generated when the number of valid data entries in the transmit FIFO is equal to or below this field value, and TDMAE = 1.

Register|BitsName ---------------|--------------- DMA_TX_LEVEL | LEVEL

Parameters

  I2Cx | I2C instance
  level | This parameter should range between 0x0 and 0x8.

Return values

  None. |

Definition at line 3434 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_set_scl_stuck_at_low_timeout()

__STATIC_INLINE void ll_i2c_set_scl_stuck_at_low_timeout | ( | i2c_regs_t * | I2Cx,
|  | uint32_t | timeout
| ) |  |

Set scl stuck timeout time.

Register|BitsName --------------------------------| --------------------- SCL_STUCK_AT_LOW_TIMEOUT | SCL_STUCK_LOW_TIMEOUT

Parameters

  I2Cx | I2C instance
  timeout | timeout time

Return values

  Address | of data register

Definition at line 3516 of file gr533x_ll_i2c.h.

## ◆ ll_i2c_set_sda_stuck_at_low_timeout()

__STATIC_INLINE void ll_i2c_set_sda_stuck_at_low_timeout | ( | i2c_regs_t * | I2Cx,
|  | uint32_t | timeout
| ) |  |

Set sda stuck timeout time.

Register|BitsName --------------------------------| --------------------- SDA_STUCK_AT_LOW_TIMEOUT | SDA_STUCK_LOW_TIMEOUT

Parameters

  I2Cx | I2C instance
  timeout | timeout time

Return values

  Address | of data register

Definition at line 3532 of file gr533x_ll_i2c.h.