|
Azure Sphere MT3620 M4 API Reference Manual
|
The mtk_i2c_controller contains hardware information( such as base address) of i2c controller, data transmission information and transmission methode,etc. More...
#include <mhal_i2c.h>
Data Fields | |
| void __iomem * | base |
| I2C controller base address. | |
| void __iomem * | cg_base |
| Clock gate base address of I2C controller. | |
| int | dma_tx_chan |
| TX DMA channel. | |
| int | dma_rx_chan |
| RX DMA channel. | |
| struct i2c_msg * | msg |
| Configure I2C transfer message. | |
| u8 | msg_num |
| The number of message. | |
| bool | dma_en |
| I2C supports FIFO mode and DMA mode, 0: FIFO mode, 1: DMA mode. | |
| u32 | irq_stat |
| Interrupt flag, this parameter will be set in mtk_mhal_i2c_irq_handle(). More... | |
| u32 | timeout |
| Set the transmission timeout period. | |
| enum i2c_speed_kHz | i2c_speed |
| I2C master transfer speed. | |
| enum i2c_trans_mode | i2c_mode |
| 0: Set I2C controller as a master or slave role | |
| u8 | op |
| I2C master transfer mode, it is used to HDL driver. | |
| u8 | slave_addr |
| Set i2c slave address, default by 0x20. | |
| struct mtk_i2c_private * | mdata |
| M-HAL private structure is used by M-HAL only. | |
The mtk_i2c_controller contains hardware information( such as base address) of i2c controller, data transmission information and transmission methode,etc.
| u32 irq_stat |
Interrupt flag, this parameter will be set in mtk_mhal_i2c_irq_handle().
The OS-HAL driver can judge the transmission status based on this flag.