Go to the source code of this file.
Data Structures | |
| struct | i2c_config_t |
| I2C config. More... | |
Typedefs | |
| typedef enum i2c_mode | i2c_mode_t |
| I2C mode. More... | |
| typedef enum i2c_seq_transfer_opt | i2c_seq_transfer_opt_t |
| I2c sequential transfer options. More... | |
Enumerations | |
| enum | { status_i2c_no_ack = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 1 )) , status_i2c_invalid_data = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 2 )) , status_i2c_no_addr_hit = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 3 )) , status_i2c_transmit_not_completed = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 4 )) , status_i2c_bus_busy = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 5 )) , status_i2c_not_supported = ((uint32_t)( status_group_i2c )*1000U + (uint32_t)( 9 )) } |
| I2C status. More... | |
| enum | i2c_mode { i2c_mode_normal , i2c_mode_fast , i2c_mode_fast_plus } |
| I2C mode. More... | |
| enum | i2c_seq_transfer_opt { i2c_frist_frame = 0 , i2c_next_frame , i2c_last_frame } |
| I2c sequential transfer options. More... | |
Functions | |
| static void | i2c_respond_Nack (I2C_Type *ptr) |
| respond NACK More... | |
| static void | i2c_respond_ack (I2C_Type *ptr) |
| respond ACK More... | |
| static void | i2c_clear_fifo (I2C_Type *ptr) |
| clear I2C fifo More... | |
| static uint16_t | i2c_get_data_count (I2C_Type *ptr) |
| check data count More... | |
| static bool | i2c_fifo_is_full (I2C_Type *ptr) |
| check if I2C FIFO is full More... | |
| static bool | i2c_fifo_is_half (I2C_Type *ptr) |
| check if I2C FIFO is half More... | |
| static bool | i2c_fifo_is_empty (I2C_Type *ptr) |
| check if I2C FIFO is empty More... | |
| static bool | i2c_is_writing (I2C_Type *ptr) |
| check if I2C is writing More... | |
| static bool | i2c_is_reading (I2C_Type *ptr) |
| check if I2C is reading More... | |
| static bool | i2c_get_line_sda_status (I2C_Type *ptr) |
| get i2c sda line status More... | |
| static bool | i2c_get_line_scl_status (I2C_Type *ptr) |
| get i2c scl line status More... | |
| static void | i2c_clear_status (I2C_Type *ptr, uint32_t mask) |
| clear status More... | |
| static uint32_t | i2c_get_status (I2C_Type *ptr) |
| get status More... | |
| static uint32_t | i2c_get_irq_setting (I2C_Type *ptr) |
| i2c get interrupts setting More... | |
| static void | i2c_disable_irq (I2C_Type *ptr, uint32_t mask) |
| disable interrupts More... | |
| static void | i2c_enable_irq (I2C_Type *ptr, uint32_t mask) |
| enable interrupts More... | |
| static void | i2c_disable_auto_ack (I2C_Type *ptr) |
| disable auto ack More... | |
| static void | i2c_enable_auto_ack (I2C_Type *ptr) |
| enable auto ack More... | |
| static void | i2c_enable_10bit_address_mode (I2C_Type *ptr, bool enable) |
| enable 10 bit address mode More... | |
| hpm_stat_t | i2c_init_master (I2C_Type *ptr, uint32_t src_clk_in_hz, i2c_config_t *config) |
| I2C master initialization. More... | |
| hpm_stat_t | i2c_master_address_write (I2C_Type *ptr, const uint16_t device_address, uint8_t *addr, uint32_t addr_size_in_byte, uint8_t *buf, const uint32_t size_in_byte) |
| I2C master write data to specific address of certain slave device. More... | |
| hpm_stat_t | i2c_master_address_read (I2C_Type *ptr, const uint16_t device_address, uint8_t *addr, uint32_t addr_size_in_byte, uint8_t *buf, const uint32_t size_in_byte) |
| I2C master read data from specific address of certain slave device. More... | |
| hpm_stat_t | i2c_master_write (I2C_Type *ptr, const uint16_t device_address, uint8_t *buf, const uint32_t size) |
| I2C master write data to certain slave device. More... | |
| hpm_stat_t | i2c_master_start_dma_write (I2C_Type *i2c_ptr, const uint16_t device_address, uint32_t size) |
| I2C master start write data by DMA. More... | |
| hpm_stat_t | i2c_master_start_dma_read (I2C_Type *i2c_ptr, const uint16_t device_address, uint32_t size) |
| I2C master start read data by DMA. More... | |
| hpm_stat_t | i2c_master_read (I2C_Type *ptr, const uint16_t device_address, uint8_t *buf, const uint32_t size) |
| I2C master read data from certain slave device. More... | |
| hpm_stat_t | i2c_init_slave (I2C_Type *ptr, uint32_t src_clk_in_hz, i2c_config_t *config, const uint16_t slave_address) |
| I2C slave initialization. More... | |
| hpm_stat_t | i2c_slave_read (I2C_Type *ptr, uint8_t *buf, const uint32_t size) |
| I2C slave read data. More... | |
| hpm_stat_t | i2c_slave_write (I2C_Type *ptr, uint8_t *buf, const uint32_t size) |
| I2C slave write data. More... | |
| void | i2c_reset (I2C_Type *ptr) |
| reset I2C More... | |
| static void | i2c_dma_enable (I2C_Type *ptr) |
| Enable i2c DMA. More... | |
| static void | i2c_dma_disable (I2C_Type *ptr) |
| Disable i2c DMA. More... | |
| hpm_stat_t | i2c_slave_dma_transfer (I2C_Type *ptr, const uint32_t size) |
| I2C slave dma transfer data. More... | |
| static void | i2c_write_byte (I2C_Type *ptr, uint8_t data) |
| I2C write byte into FIFO. More... | |
| static uint8_t | i2c_read_byte (I2C_Type *ptr) |
| I2C read byte into FIFO. More... | |
| static uint8_t | i2c_get_direction (I2C_Type *ptr) |
| I2C get direction. More... | |
| hpm_stat_t | i2c_master_configure_transfer (I2C_Type *i2c_ptr, const uint16_t device_address, uint32_t size, bool read) |
| I2C master configure transfer setting. More... | |
| hpm_stat_t | i2c_master_seq_transmit_check_ack (I2C_Type *ptr, const uint16_t device_address, uint8_t *buf, const uint32_t size, i2c_seq_transfer_opt_t opt, bool ack_check) |
| sequential transmit in master I2C mode an amount of data and checks ACK in blocking More... | |
| hpm_stat_t | i2c_master_seq_receive (I2C_Type *ptr, const uint16_t device_address, uint8_t *buf, const uint32_t size, i2c_seq_transfer_opt_t opt) |
| sequential receive in master I2C mode an amount of data in blocking More... | |
| static void | i2c_gen_reset_signal (I2C_Type *ptr, uint8_t clk_len) |
| generate SCL clock as reset signal More... | |
| hpm_stat_t | i2c_master_transfer (I2C_Type *ptr, const uint16_t device_address, uint8_t *buf, const uint32_t size, uint16_t flags) |
| data transfer on master I2C mode in blocking More... | |
| static hpm_stat_t | i2c_set_data_count (I2C_Type *ptr, uint32_t size) |
| Set the I2C data transfer count. More... | |
| static void | i2c_master_issue_data_transmission (I2C_Type *ptr) |
| Trigger the I2C controller to issue a data transmission command. More... | |
| static void | i2c_master_set_slave_address (I2C_Type *ptr, uint16_t address) |
| Set the slave address for I2C master mode. More... | |
| static void | i2c_master_enable_start_phase (I2C_Type *ptr) |
| Enable start phase at the transaction. More... | |
| static void | i2c_master_disable_start_phase (I2C_Type *ptr) |
| Disable start phase at the transaction. More... | |
| static void | i2c_master_enable_addr_phase (I2C_Type *ptr) |
| Enable address phase at the transaction. More... | |
| static void | i2c_master_disable_addr_phase (I2C_Type *ptr) |
| Disable address phase at the transaction. More... | |
| static void | i2c_master_enable_data_phase (I2C_Type *ptr) |
| Enable data phase at the transaction. More... | |
| static void | i2c_master_disable_data_phase (I2C_Type *ptr) |
| Disable data phase at the transaction. More... | |
| static void | i2c_master_enable_stop_phase (I2C_Type *ptr) |
| Enable stop phase at the transaction. More... | |
| static void | i2c_master_disable_stop_phase (I2C_Type *ptr) |
| Disable stop phase at the transaction. More... | |
| static void | i2c_set_direction (I2C_Type *ptr, bool direction) |
| set i2c transaction direction More... | |