Functions | |
__STATIC_INLINE void | ll_i2c_enable (i2c_regs_t *I2Cx) |
Enable I2C peripheral (ENABLE = 1). More... | |
__STATIC_INLINE void | ll_i2c_disable (i2c_regs_t *I2Cx) |
Disable I2C peripheral (ENABLE = 0). More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled (i2c_regs_t *I2Cx) |
Check if the I2C peripheral is enabled or disabled. More... | |
__STATIC_INLINE void | ll_i2c_enable_master_mode (i2c_regs_t *I2Cx) |
Enable I2C master mode. More... | |
__STATIC_INLINE void | ll_i2c_disable_master_mode (i2c_regs_t *I2Cx) |
Disable I2C master mode and enable slave mode. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_master_mode (i2c_regs_t *I2Cx) |
Check if I2C master mode is enabled or disabled. More... | |
__STATIC_INLINE void | ll_i2c_enable_general_call (i2c_regs_t *I2Cx) |
Enable General Call(slave mode). More... | |
__STATIC_INLINE void | ll_i2c_disable_general_call (i2c_regs_t *I2Cx) |
Disable General Call(slave mode). More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_general_call (i2c_regs_t *I2Cx) |
Check if General Call is enabled or disabled(slave mode). More... | |
__STATIC_INLINE void | ll_i2c_enable_master_restart (i2c_regs_t *I2Cx) |
Enable Master Restart. More... | |
__STATIC_INLINE void | ll_i2c_disable_master_restart (i2c_regs_t *I2Cx) |
Disable Master Restart. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_master_restart (i2c_regs_t *I2Cx) |
Check if Master Restart is enabled or disabled. More... | |
__STATIC_INLINE void | ll_i2c_enable_stop_det_if_addressed (i2c_regs_t *I2Cx) |
Enable Slave issues STOP_DET interrupt only if addressed function. More... | |
__STATIC_INLINE void | ll_i2c_disable_stop_det_if_addressed (i2c_regs_t *I2Cx) |
Disable Slave issues STOP_DET interrupt only if addressed function. More... | |
__STATIC_INLINE void | ll_i2c_hold_bus_if_rx_full (i2c_regs_t *I2Cx) |
Hold bus when the RX FIFO if full function. More... | |
__STATIC_INLINE void | ll_i2c_overflow_if_rx_full (i2c_regs_t *I2Cx) |
overflow when the RX FIFO if full function. More... | |
__STATIC_INLINE void | ll_i2c_enable_bus_clear_feature (i2c_regs_t *I2Cx) |
enable bus clear feature function. More... | |
__STATIC_INLINE void | ll_i2c_disable_bus_clear_feature (i2c_regs_t *I2Cx) |
disable bus clear feature function. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_bus_clear_feature (i2c_regs_t *I2Cx) |
check bus clear feature is enabled function. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_stop_det_if_addressed (i2c_regs_t *I2Cx) |
Check if Slave issues STOP_DET interrupt only if addressed function is enabled or disabled. More... | |
__STATIC_INLINE void | ll_i2c_set_master_addressing_mode (i2c_regs_t *I2Cx, uint32_t addressing_mode) |
Configure the Master to transfers in 7-bit or 10-bit addressing mode. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_master_addressing_mode (i2c_regs_t *I2Cx) |
Get the Master addressing mode. More... | |
__STATIC_INLINE void | ll_i2c_set_own_address (i2c_regs_t *I2Cx, uint32_t own_address, uint32_t own_addr_size) |
Set the Own Address. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_high_period_ss (i2c_regs_t *I2Cx, uint32_t count) |
Set the SCL clock high-period count for standard speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_high_period_ss (i2c_regs_t *I2Cx) |
Get the SCL clock high-period count for standard speed. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_low_period_ss (i2c_regs_t *I2Cx, uint32_t count) |
Set the SCL clock low-period count for standard speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_low_period_ss (i2c_regs_t *I2Cx) |
Get the SCL clock low-period count for standard speed. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_high_period_fs (i2c_regs_t *I2Cx, uint32_t count) |
Set the SCL clock high-period count for fast speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_high_period_fs (i2c_regs_t *I2Cx) |
Get the SCL clock high-period count for fast speed. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_low_period_fs (i2c_regs_t *I2Cx, uint32_t count) |
Set the SCL clock low-period count for fast speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_low_period_fs (i2c_regs_t *I2Cx) |
Get the SCL clock low-period count for fast speed. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_high_period_hs (i2c_regs_t *I2Cx, uint32_t count) |
Get the SCL clock high-period count for high speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_high_period_hs (i2c_regs_t *I2Cx) |
Get the SCL clock high-period count for high speed. More... | |
__STATIC_INLINE void | ll_i2c_set_clock_low_period_hs (i2c_regs_t *I2Cx, uint32_t count) |
Get the SCL clock low-period count for high speed. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_clock_low_period_hs (i2c_regs_t *I2Cx) |
Get the SCL clock low-period count for high speed. More... | |
__STATIC_INLINE void | ll_i2c_set_spike_len_fs (i2c_regs_t *I2Cx, uint32_t length) |
Set the spike len in fast speed mode. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_spike_len_fs (i2c_regs_t *I2Cx) |
Get the spike len in fast speed mode. More... | |
__STATIC_INLINE void | ll_i2c_set_spike_len_hs (i2c_regs_t *I2Cx, uint32_t length) |
Set the spike len in high speed mode. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_spike_len_hs (i2c_regs_t *I2Cx) |
Get the spike len in high speed mode. More... | |
__STATIC_INLINE void | ll_i2c_set_speed_mode (i2c_regs_t *I2Cx, uint32_t speed_mode) |
Set I2C Speed mode. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_speed_mode (i2c_regs_t *I2Cx) |
Get I2C Speed mode. More... | |
__STATIC_INLINE void | ll_i2c_set_high_speed_master_code (i2c_regs_t *I2Cx, uint32_t code) |
Set I2C High Speed Master Code Address. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_high_speed_master_code (i2c_regs_t *I2Cx) |
Get I2C Speed mode. More... | |
__STATIC_INLINE void | ll_i2c_set_data_tx_hold_time (i2c_regs_t *I2Cx, uint32_t time) |
Set the required transmit SDA hold time in units of ic_clk period. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_data_tx_hold_time (i2c_regs_t *I2Cx) |
Get the required transmit SDA hold time in units of ic_clk period. More... | |
__STATIC_INLINE void | ll_i2c_set_data_rx_hold_time (i2c_regs_t *I2Cx, uint32_t time) |
Set the required receive SDA hold time in units of ic_clk period. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_data_rx_hold_time (i2c_regs_t *I2Cx) |
Get the required receive SDA hold time in units of ic_clk period. More... | |
__STATIC_INLINE void | ll_i2c_set_data_setup_time (i2c_regs_t *I2Cx, uint32_t time) |
Set the SDA setup time when operating as a slave transmitter. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_data_setup_time (i2c_regs_t *I2Cx) |
Get the SDA setup time when operating as a slave transmitter. More... | |
__STATIC_INLINE void | ll_i2c_set_tx_fifo_threshold (i2c_regs_t *I2Cx, uint32_t threshold) |
Set threshold of entries (or below) that trigger the TX_EMPTY interrupt. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_tx_fifo_threshold (i2c_regs_t *I2Cx) |
Get threshold of TX FIFO that triggers an THRE interrupt. More... | |
__STATIC_INLINE void | ll_i2c_set_rx_fifo_threshold (i2c_regs_t *I2Cx, uint32_t threshold) |
Set threshold of RX FIFO that triggers an RDA interrupt. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_rx_fifo_threshold (i2c_regs_t *I2Cx) |
Get threshold of RX FIFO that triggers an RDA interrupt. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_tx_fifo_level (i2c_regs_t *I2Cx) |
Get FIFO Transmission Level. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_rx_fifo_level (i2c_regs_t *I2Cx) |
Get FIFO reception Level. More... | |
__STATIC_INLINE void | ll_i2c_enable_sda_stuck_recovery (i2c_regs_t *I2Cx) |
Master initates the SDA stuck at low recovery mechanism. More... | |
__STATIC_INLINE void | ll_i2c_disable_sda_stuck_recovery (i2c_regs_t *I2Cx) |
Master disabled the SDA stuck at low recovery mechanism. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_sda_stuck_recovery (i2c_regs_t *I2Cx) |
the SDA stuck at low recovery mechanism is enabled or disabled. More... | |
__STATIC_INLINE void | ll_i2c_enable_transfer_abort (i2c_regs_t *I2Cx) |
Enable DMA reception requests. More... | |
__STATIC_INLINE uint32_t | ll_i2c_is_enabled_transfer_abort (i2c_regs_t *I2Cx) |
Check if DMA reception requests are enabled or disabled. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_abort_source (i2c_regs_t *I2Cx) |
Get the transmit abort source. More... | |
__STATIC_INLINE uint32_t | ll_i2c_get_tx_flush_count (i2c_regs_t *I2Cx) |
Get the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt. More... | |
__STATIC_INLINE void ll_i2c_disable | ( | i2c_regs_t * | I2Cx | ) |
Disable I2C peripheral (ENABLE = 0).
Register|BitsName ---------------|--------------- EN | ACTIVITY
I2Cx | I2C instance. |
None. |
Definition at line 404 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_bus_clear_feature | ( | i2c_regs_t * | I2Cx | ) |
disable bus clear feature function.
Register|BitsName ---------------|--------------- CTRL | BUS_CLR_FEATURE
I2Cx | I2C instance. |
None. |
Definition at line 665 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_general_call | ( | i2c_regs_t * | I2Cx | ) |
Disable General Call(slave mode).
Register|BitsName ---------------|--------------- ACK_GEN_CALL | ACK_GEN_CALL
I2Cx | I2C instance. |
None. |
Definition at line 497 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_master_mode | ( | i2c_regs_t * | I2Cx | ) |
Disable I2C master mode and enable slave mode.
Register|BitsName ---------------|--------------- CTRL | MASTER_ENABLE CTRL | SLAVE_DISABLE
I2Cx | I2C instance. |
None. |
Definition at line 449 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_master_restart | ( | i2c_regs_t * | I2Cx | ) |
Disable Master Restart.
Register|BitsName ---------------|--------------- CTRL | RESTART_EN
I2Cx | I2C instance. |
None. |
Definition at line 550 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_sda_stuck_recovery | ( | i2c_regs_t * | I2Cx | ) |
Master disabled the SDA stuck at low recovery mechanism.
Register|BitsName ---------------|--------------- EN | SDA_STUCK_RECOVERY
I2Cx | I2C instance |
Definition at line 1436 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_disable_stop_det_if_addressed | ( | i2c_regs_t * | I2Cx | ) |
Disable Slave issues STOP_DET interrupt only if addressed function.
Register|BitsName ---------------|--------------- CTRL | STOP_DET_INT
I2Cx | I2C instance. |
None. |
Definition at line 601 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable | ( | i2c_regs_t * | I2Cx | ) |
Enable I2C peripheral (ENABLE = 1).
Register|BitsName ---------------|--------------- EN | ACTIVITY
I2Cx | I2C instance. |
None. |
Definition at line 384 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_bus_clear_feature | ( | i2c_regs_t * | I2Cx | ) |
enable bus clear feature function.
Register|BitsName ---------------|--------------- CTRL | BUS_CLR_FEATURE
I2Cx | I2C instance. |
None. |
Definition at line 649 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_general_call | ( | i2c_regs_t * | I2Cx | ) |
Enable General Call(slave mode).
Register|BitsName ---------------|--------------- ACK_GEN_CALL | ACK_GEN_CALL
I2Cx | I2C instance. |
None. |
Definition at line 481 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_master_mode | ( | i2c_regs_t * | I2Cx | ) |
Enable I2C master mode.
Register|BitsName ---------------|--------------- CTRL | MASTER_ENABLE CTRL | SLAVE_DISABLE
I2Cx | I2C instance. |
None. |
Definition at line 434 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_master_restart | ( | i2c_regs_t * | I2Cx | ) |
Enable Master Restart.
Register|BitsName ---------------|--------------- CTRL | RESTART_EN
I2Cx | I2C instance. |
None. |
Definition at line 534 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_sda_stuck_recovery | ( | i2c_regs_t * | I2Cx | ) |
Master initates the SDA stuck at low recovery mechanism.
Register|BitsName ---------------|--------------- EN | SDA_STUCK_RECOVERY
I2Cx | I2C instance |
Definition at line 1422 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_stop_det_if_addressed | ( | i2c_regs_t * | I2Cx | ) |
Enable Slave issues STOP_DET interrupt only if addressed function.
Register|BitsName ---------------|--------------- CTRL | STOP_DET_INT
I2Cx | I2C instance. |
None. |
Definition at line 585 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_enable_transfer_abort | ( | i2c_regs_t * | I2Cx | ) |
Enable DMA reception requests.
Register|BitsName ---------------|--------------- EN | ABORT
I2Cx | I2C instance. |
None. |
Definition at line 1466 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_abort_source | ( | i2c_regs_t * | I2Cx | ) |
Get the transmit abort source.
Register|BitsName ---------------|--------------- TX_ABORT_SRC | ABRT_USER_ABRT TX_ABORT_SRC | ABRT_SLVRD_INTX TX_ABORT_SRC | ABRT_SLV_ARBLOST TX_ABORT_SRC | ABRT_SLVFLUSH_TXFIFO TX_ABORT_SRC | ABRT_ARB_LOST TX_ABORT_SRC | ABRT_MST_DIS TX_ABORT_SRC | ABRT_10B_RD_NORSTRT TX_ABORT_SRC | ABRT_SBYTE_NORSTRT TX_ABORT_SRC | ABRT_HS_NORSTRT TX_ABORT_SRC | ABRT_SBYTE_ACKDET TX_ABORT_SRC | ABRT_HS_ACKDET TX_ABORT_SRC | ABRT_GCALL_READ TX_ABORT_SRC | ABRT_GCALL_NOACK TX_ABORT_SRC | ABRT_TXDATA_NOACK TX_ABORT_SRC | ABRT_10ADDR2_NOACK TX_ABORT_SRC | ABRT_10ADDR1_NOACK TX_ABORT_SRC | ABRT_7B_ADDR_NOACK
I2Cx | I2C instance |
Definition at line 1534 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_high_period_fs | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock high-period count for fast speed.
Register|BitsName ---------------|--------------- FS_CLK_HCOUNT | COUNT
I2Cx | I2C instance. |
Value | range between 0x6 and 0xFFFF. |
Definition at line 852 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_high_period_hs | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock high-period count for high speed.
Register|BitsName ---------------|--------------- HS_CLK_HCOUNT | COUNT
I2Cx | I2C instance. |
range | between 0x6 and 0xFFFF, should be larger than IC_HS_SPKLEN + 7. |
Definition at line 916 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_high_period_ss | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock high-period count for standard speed.
Register|BitsName ---------------|--------------- SS_CLK_HCOUNT | COUNT
I2Cx | I2C instance. |
Value | range between 0x6 and 0xFFF5. |
Definition at line 788 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_low_period_fs | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock low-period count for fast speed.
Register|BitsName ---------------|--------------- FS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
Value | range between 0x8 and 0xFFFF. |
Definition at line 884 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_low_period_hs | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock low-period count for high speed.
Register|BitsName ---------------|--------------- HS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
Value | range between 0x8 and 0xFFFF |
Definition at line 948 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_clock_low_period_ss | ( | i2c_regs_t * | I2Cx | ) |
Get the SCL clock low-period count for standard speed.
Register|BitsName ---------------|--------------- SS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
Value | range between 0x8 and 0xFFFF. |
Definition at line 820 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_data_rx_hold_time | ( | i2c_regs_t * | I2Cx | ) |
Get the required receive SDA hold time in units of ic_clk period.
Register|BitsName ---------------|--------------- SDA_HOLD | RX_HOLD
I2Cx | I2C instance. |
Value | range between 1 and (N_SCL_LOW - 2) in master mode or 7 and (N_SCL_LOW - 2) in slave mode |
Definition at line 1148 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_data_setup_time | ( | i2c_regs_t * | I2Cx | ) |
Get the SDA setup time when operating as a slave transmitter.
Register|BitsName ---------------|--------------- SDA_SETUP | SETUP
I2Cx | I2C instance. |
Value | range between 0x02 and 0xFF. |
Definition at line 1182 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_data_tx_hold_time | ( | i2c_regs_t * | I2Cx | ) |
Get the required transmit SDA hold time in units of ic_clk period.
Register|BitsName ---------------|--------------- SDA_HOLD | TX_HOLD
I2Cx | I2C instance. |
Value | range between 1 and (N_SCL_LOW - 2) in master mode or 7 and (N_SCL_LOW - 2) in slave mode |
Definition at line 1115 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_high_speed_master_code | ( | i2c_regs_t * | I2Cx | ) |
Get I2C Speed mode.
Register|BitsName ---------------|--------------- M_HS_ADDR | HS_MAR
I2Cx | I2C instance. |
Returned | value range between 0x00 and 0x07. |
Definition at line 1082 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_master_addressing_mode | ( | i2c_regs_t * | I2Cx | ) |
Get the Master addressing mode.
Register|BitsName ---------------|--------------- CTRL | ADDR_BIT_M
I2Cx | I2C instance. |
Returned | value can be one of the following values: |
Definition at line 733 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_rx_fifo_level | ( | i2c_regs_t * | I2Cx | ) |
Get FIFO reception Level.
Register|BitsName ---------------|--------------- RX_FIFO_THD | LEVEL
I2Cx | I2C instance |
Value | range between 0x0 and 0x1F. |
Definition at line 1408 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_rx_fifo_threshold | ( | i2c_regs_t * | I2Cx | ) |
Get threshold of RX FIFO that triggers an RDA interrupt.
Register|BitsName ---------------|--------------- RX_FIFO_THD | THD
I2Cx | I2C instance |
Definition at line 1378 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_speed_mode | ( | i2c_regs_t * | I2Cx | ) |
Get I2C Speed mode.
Register|BitsName ---------------|--------------- CTRL | SPEED
I2Cx | I2C instance. |
Value | can be one of the following values: |
Definition at line 1050 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_spike_len_fs | ( | i2c_regs_t * | I2Cx | ) |
Get the spike len in fast speed mode.
Register|BitsName ---------------|--------------- FS_SPKLEN | FS_SPKLEN
I2Cx | I2C instance. |
Value | range between 0x2 and 0xFF. |
Definition at line 980 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_spike_len_hs | ( | i2c_regs_t * | I2Cx | ) |
Get the spike len in high speed mode.
Register|BitsName ---------------|--------------- HS_SPKLEN | HS_SPKLEN
I2Cx | I2C instance. |
Value | range between 0x2 and 0xFF. |
Definition at line 1012 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_tx_fifo_level | ( | i2c_regs_t * | I2Cx | ) |
Get FIFO Transmission Level.
Register|BitsName ---------------|--------------- RX_FIFO_THD | LEVEL
I2Cx | I2C instance |
Value | range between 0x0 and 0x1F. |
Definition at line 1393 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_tx_fifo_threshold | ( | i2c_regs_t * | I2Cx | ) |
Get threshold of TX FIFO that triggers an THRE interrupt.
Register|BitsName ---------------|--------------- TX_FIFO_THD | THD
I2Cx | I2C instance |
Definition at line 1280 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_get_tx_flush_count | ( | i2c_regs_t * | I2Cx | ) |
Get the number of Tx FIFO Data Commands which are flushed due to TX_ABRT interrupt.
Register|BitsName ---------------|--------------- TX_ABORT_SRC | TX_FLUSH_CNT
I2Cx | I2C instance |
Tx | flush count. |
Definition at line 1549 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_hold_bus_if_rx_full | ( | i2c_regs_t * | I2Cx | ) |
Hold bus when the RX FIFO if full function.
Register|BitsName ---------------|--------------- CTRL | RXFIFO_FULL_HLD
I2Cx | I2C instance. |
None. |
Definition at line 617 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled | ( | i2c_regs_t * | I2Cx | ) |
Check if the I2C peripheral is enabled or disabled.
Register|BitsName ---------------|--------------- STAT | STAT_EN
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 419 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_bus_clear_feature | ( | i2c_regs_t * | I2Cx | ) |
check bus clear feature is enabled function.
Register|BitsName ---------------|--------------- CTRL | BUS_CLR_FEATURE
I2Cx | I2C instance. |
None. |
Definition at line 681 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_general_call | ( | i2c_regs_t * | I2Cx | ) |
Check if General Call is enabled or disabled(slave mode).
Register|BitsName ---------------|--------------- ACK_GEN_CALL | ACK_GEN_CALL
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 512 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_master_mode | ( | i2c_regs_t * | I2Cx | ) |
Check if I2C master mode is enabled or disabled.
Register|BitsName ---------------|--------------- CTRL | MASTER_ENABLE CTRL | SLAVE_DISABLE
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 465 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_master_restart | ( | i2c_regs_t * | I2Cx | ) |
Check if Master Restart is enabled or disabled.
Register|BitsName ---------------|--------------- CTRL | RESTART_EN
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 565 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_sda_stuck_recovery | ( | i2c_regs_t * | I2Cx | ) |
the SDA stuck at low recovery mechanism is enabled or disabled.
Register|BitsName ---------------|--------------- EN | SDA_STUCK_RECOVERY
I2Cx | I2C instance |
State | of bit (1 or 0). |
Definition at line 1451 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_stop_det_if_addressed | ( | i2c_regs_t * | I2Cx | ) |
Check if Slave issues STOP_DET interrupt only if addressed function is enabled or disabled.
Register|BitsName ---------------|--------------- CTRL | STOP_DET_INT
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 696 of file gr55xx_ll_i2c.h.
__STATIC_INLINE uint32_t ll_i2c_is_enabled_transfer_abort | ( | i2c_regs_t * | I2Cx | ) |
Check if DMA reception requests are enabled or disabled.
Register|BitsName ---------------|--------------- EN | ABORT
I2Cx | I2C instance. |
State | of bit (1 or 0). |
Definition at line 1481 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_overflow_if_rx_full | ( | i2c_regs_t * | I2Cx | ) |
overflow when the RX FIFO if full function.
Register|BitsName ---------------|--------------- CTRL | RXFIFO_FULL_HLD
I2Cx | I2C instance. |
None. |
Definition at line 633 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_high_period_fs | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Set the SCL clock high-period count for fast speed.
Register|BitsName ---------------|--------------- FS_CLK_HCOUNT | COUNT
I2Cx | I2C instance. |
count | range between 0x6 and 0xFFFF. |
None. |
Definition at line 837 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_high_period_hs | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Get the SCL clock high-period count for high speed.
Register|BitsName ---------------|--------------- HS_CLK_HCOUNT | COUNT
I2Cx | I2C instance. |
count | range between 0x6 and 0xFFFF, should be larger than IC_HS_SPKLEN + 5. |
None. |
Definition at line 901 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_high_period_ss | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Set the SCL clock high-period count for standard speed.
Register|BitsName ---------------|--------------- SS_CLK_HCOUNT | SS_SCL_HCNT
I2Cx | I2C instance. |
count | This parameter must be a value range between 6 ~ 0xFFF5. |
None. |
Definition at line 773 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_low_period_fs | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Set the SCL clock low-period count for fast speed.
Register|BitsName ---------------|--------------- FS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
count | range between 0x8 and 0xFFFF |
None. |
Definition at line 869 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_low_period_hs | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Get the SCL clock low-period count for high speed.
Register|BitsName ---------------|--------------- HS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
count | range between 0x8 and 0xFFFF |
None. |
Definition at line 933 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_clock_low_period_ss | ( | i2c_regs_t * | I2Cx, |
uint32_t | count | ||
) |
Set the SCL clock low-period count for standard speed.
Register|BitsName ---------------|--------------- SS_CLK_LCOUNT | COUNT
I2Cx | I2C instance. |
count | This parameter must be a value range between 0x8 and 0xFFFF. |
None. |
Definition at line 805 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_data_rx_hold_time | ( | i2c_regs_t * | I2Cx, |
uint32_t | time | ||
) |
Set the required receive SDA hold time in units of ic_clk period.
Register|BitsName ---------------|--------------- SDA_HOLD | RX_HOLD
I2Cx | I2C instance. |
time | SDA Tx hold time in units of ic_clk period. Time should range between 1 and (N_SCL_LOW - 2) in master mode or 7 and (N_SCL_LOW - 2) in slave mode. |
Value | between Min_Data=0x0 and Max_Data=0xF |
Definition at line 1133 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_data_setup_time | ( | i2c_regs_t * | I2Cx, |
uint32_t | time | ||
) |
Set the SDA setup time when operating as a slave transmitter.
Register|BitsName ---------------|--------------- SDA_SETUP | SETUP
I2Cx | I2C instance. |
time | SDA data setup time in units of ic_clk period, range between 2 ~ 0xFF. |
None. |
Definition at line 1167 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_data_tx_hold_time | ( | i2c_regs_t * | I2Cx, |
uint32_t | time | ||
) |
Set the required transmit SDA hold time in units of ic_clk period.
Register|BitsName ---------------|--------------- SDA_HOLD | TX_HOLD
I2Cx | I2C instance. |
time | SDA Tx hold time in units of ic_clk period. Time should range between 1 and (N_SCL_LOW - 2) in master mode or 7 and (N_SCL_LOW - 2) in slave mode. |
None. |
Definition at line 1100 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_high_speed_master_code | ( | i2c_regs_t * | I2Cx, |
uint32_t | code | ||
) |
Set I2C High Speed Master Code Address.
Register|BitsName ---------------|--------------- M_HS_ADDR | HS_MAR
I2Cx | I2C instance. |
code | HS mode master code, range between 0x00 and 0x07. |
None. |
Definition at line 1067 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_master_addressing_mode | ( | i2c_regs_t * | I2Cx, |
uint32_t | addressing_mode | ||
) |
Configure the Master to transfers in 7-bit or 10-bit addressing mode.
Register|BitsName ---------------|--------------- CTRL | ADDR_BIT_M
I2Cx | I2C instance. |
addressing_mode | This parameter can be one of the following values: |
None. |
Definition at line 715 of file gr55xx_ll_i2c.h.
Referenced by ll_i2c_handle_transfer().
__STATIC_INLINE void ll_i2c_set_own_address | ( | i2c_regs_t * | I2Cx, |
uint32_t | own_address, | ||
uint32_t | own_addr_size | ||
) |
Set the Own Address.
Register|BitsName ---------------|--------------- CTRL | ADDR_BIT_S S_ADDR | SAR
I2Cx | I2C instance. |
own_address | This parameter must be a value range between 0 ~ 0x3FF(10-bit mode) or 0 ~ 0x7F(7-bit mode). Reserved address 0x00 to 0x07, or 0x78 to 0x7f should not be configured. |
own_addr_size | This parameter can be one of the following values: |
None. |
Definition at line 755 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_rx_fifo_threshold | ( | i2c_regs_t * | I2Cx, |
uint32_t | threshold | ||
) |
Set threshold of RX FIFO that triggers an RDA interrupt.
Register|BitsName ---------------|--------------- RX_FIFO_THD | THD
None. |
Definition at line 1330 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_speed_mode | ( | i2c_regs_t * | I2Cx, |
uint32_t | speed_mode | ||
) |
Set I2C Speed mode.
Register|BitsName ---------------|--------------- CTRL | SPEED
I2Cx | I2C instance. |
speed_mode | This parameter can be one of the following values: |
None. |
Definition at line 1032 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_spike_len_fs | ( | i2c_regs_t * | I2Cx, |
uint32_t | length | ||
) |
Set the spike len in fast speed mode.
Register|BitsName ---------------|--------------- FS_SPKLEN | FS_SPKLEN
I2Cx | I2C instance. |
length | Spike len. |
None. |
Definition at line 965 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_spike_len_hs | ( | i2c_regs_t * | I2Cx, |
uint32_t | length | ||
) |
Set the spike len in high speed mode.
Register|BitsName ---------------|--------------- HS_SPKLEN | HS_SPKLEN
I2Cx | I2C instance. |
length | Spike len. |
None. |
Definition at line 997 of file gr55xx_ll_i2c.h.
__STATIC_INLINE void ll_i2c_set_tx_fifo_threshold | ( | i2c_regs_t * | I2Cx, |
uint32_t | threshold | ||
) |
Set threshold of entries (or below) that trigger the TX_EMPTY interrupt.
Register|BitsName ---------------|--------------- TX_FIFO_THD | THD
None. |
Definition at line 1232 of file gr55xx_ll_i2c.h.