9 #ifndef _HARDWARE_STRUCTS_I2C_H
10 #define _HARDWARE_STRUCTS_I2C_H
13 #include "hardware/regs/i2c.h"
24 _REG_(I2C_IC_CON_OFFSET)
38 _REG_(I2C_IC_TAR_OFFSET)
45 _REG_(I2C_IC_SAR_OFFSET)
52 _REG_(I2C_IC_DATA_CMD_OFFSET)
61 _REG_(I2C_IC_SS_SCL_HCNT_OFFSET)
66 _REG_(I2C_IC_SS_SCL_LCNT_OFFSET)
71 _REG_(I2C_IC_FS_SCL_HCNT_OFFSET)
76 _REG_(I2C_IC_FS_SCL_LCNT_OFFSET)
83 _REG_(I2C_IC_INTR_STAT_OFFSET)
100 _REG_(I2C_IC_INTR_MASK_OFFSET)
117 _REG_(I2C_IC_RAW_INTR_STAT_OFFSET)
132 io_ro_32 raw_intr_stat;
134 _REG_(I2C_IC_RX_TL_OFFSET)
139 _REG_(I2C_IC_TX_TL_OFFSET)
144 _REG_(I2C_IC_CLR_INTR_OFFSET)
149 _REG_(I2C_IC_CLR_RX_UNDER_OFFSET)
152 io_ro_32 clr_rx_under;
154 _REG_(I2C_IC_CLR_RX_OVER_OFFSET)
157 io_ro_32 clr_rx_over;
159 _REG_(I2C_IC_CLR_TX_OVER_OFFSET)
162 io_ro_32 clr_tx_over;
164 _REG_(I2C_IC_CLR_RD_REQ_OFFSET)
169 _REG_(I2C_IC_CLR_TX_ABRT_OFFSET)
172 io_ro_32 clr_tx_abrt;
174 _REG_(I2C_IC_CLR_RX_DONE_OFFSET)
177 io_ro_32 clr_rx_done;
179 _REG_(I2C_IC_CLR_ACTIVITY_OFFSET)
182 io_ro_32 clr_activity;
184 _REG_(I2C_IC_CLR_STOP_DET_OFFSET)
187 io_ro_32 clr_stop_det;
189 _REG_(I2C_IC_CLR_START_DET_OFFSET)
192 io_ro_32 clr_start_det;
194 _REG_(I2C_IC_CLR_GEN_CALL_OFFSET)
197 io_ro_32 clr_gen_call;
199 _REG_(I2C_IC_ENABLE_OFFSET)
206 _REG_(I2C_IC_STATUS_OFFSET)
217 _REG_(I2C_IC_TXFLR_OFFSET)
222 _REG_(I2C_IC_RXFLR_OFFSET)
227 _REG_(I2C_IC_SDA_HOLD_OFFSET)
233 _REG_(I2C_IC_TX_ABRT_SOURCE_OFFSET)
253 io_ro_32 tx_abrt_source;
255 _REG_(I2C_IC_SLV_DATA_NACK_ONLY_OFFSET)
258 io_rw_32 slv_data_nack_only;
260 _REG_(I2C_IC_DMA_CR_OFFSET)
266 _REG_(I2C_IC_DMA_TDLR_OFFSET)
271 _REG_(I2C_IC_DMA_RDLR_OFFSET)
276 _REG_(I2C_IC_SDA_SETUP_OFFSET)
281 _REG_(I2C_IC_ACK_GENERAL_CALL_OFFSET)
284 io_rw_32 ack_general_call;
286 _REG_(I2C_IC_ENABLE_STATUS_OFFSET)
291 io_ro_32 enable_status;
293 _REG_(I2C_IC_FS_SPKLEN_OFFSET)
300 _REG_(I2C_IC_CLR_RESTART_DET_OFFSET)
303 io_ro_32 clr_restart_det;
307 _REG_(I2C_IC_COMP_PARAM_1_OFFSET)
317 io_ro_32 comp_param_1;
319 _REG_(I2C_IC_COMP_VERSION_OFFSET)
322 io_ro_32 comp_version;
324 _REG_(I2C_IC_COMP_TYPE_OFFSET)
330 #define i2c0_hw ((i2c_hw_t *)I2C0_BASE)
331 #define i2c1_hw ((i2c_hw_t *)I2C1_BASE)