Lines Matching refs:i2c_base
58 I2C_T *i2c_base; member
98 I2C_T *i2c_base = config->i2c_base; in m_numaker_i2c_master_xfer_msg_read_last_byte() local
131 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in m_numaker_i2c_master_xfer_msg_read_last_byte()
134 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in m_numaker_i2c_master_xfer_msg_read_last_byte()
138 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in m_numaker_i2c_master_xfer_msg_read_last_byte()
150 I2C_T *i2c_base = config->i2c_base; in m_numaker_i2c_master_xfer_end() local
154 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STO_Msk | I2C_CTL0_SI_Msk); in m_numaker_i2c_master_xfer_end()
167 I2C_T *i2c_base = config->i2c_base; in m_numaker_i2c_master_xfer_msg_read_next_byte() local
180 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in m_numaker_i2c_master_xfer_msg_read_next_byte()
189 I2C_T *i2c_base = config->i2c_base; in m_numaker_i2c_master_xfer_msg_end() local
223 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STA_Msk | in m_numaker_i2c_master_xfer_msg_end()
227 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STA_Msk | I2C_CTL0_SI_Msk); in m_numaker_i2c_master_xfer_msg_end()
282 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_configure() local
296 I2C_Open(i2c_base, bitrate); in i2c_numaker_configure()
298 i2c_base->CTL0 |= (I2C_CTL0_INTEN_Msk | I2C_CTL0_I2CEN_Msk); in i2c_numaker_configure()
338 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_transfer() local
361 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STA_Msk | I2C_CTL0_SI_Msk); in i2c_numaker_transfer()
388 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STO_Msk | I2C_CTL0_SI_Msk); in i2c_numaker_transfer()
393 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_transfer()
420 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_slave_register() local
433 I2C_SetSlaveAddr(i2c_base, in i2c_numaker_slave_register()
442 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_slave_register()
457 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_slave_unregister() local
479 I2C_SetSlaveAddr(i2c_base, in i2c_numaker_slave_unregister()
488 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_slave_unregister()
504 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_recover_bus() local
508 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_STO_Msk | I2C_CTL0_SI_Msk); in i2c_numaker_recover_bus()
518 I2C_T *i2c_base = config->i2c_base; in i2c_numaker_isr() local
527 if (I2C_GET_TIMEOUT_FLAG(i2c_base)) { in i2c_numaker_isr()
528 I2C_ClearTimeoutFlag(i2c_base); in i2c_numaker_isr()
532 status = I2C_GET_STATUS(i2c_base); in i2c_numaker_isr()
549 I2C_SET_DATA(i2c_base, (uint8_t) (addr_rw & 0xFF)); in i2c_numaker_isr()
550 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_isr()
556 I2C_SET_DATA(i2c_base, *data->master_xfer.buf_pos++); in i2c_numaker_isr()
557 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
578 *data->master_xfer.buf_pos++ = I2C_GET_DATA(i2c_base); in i2c_numaker_isr()
585 *data->master_xfer.buf_pos++ = I2C_GET_DATA(i2c_base); in i2c_numaker_isr()
602 I2C_SET_DATA(i2c_base, data_byte); in i2c_numaker_isr()
603 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
606 I2C_SET_DATA(i2c_base, 0xFF); in i2c_numaker_isr()
607 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_isr()
613 I2C_SET_DATA(i2c_base, data_byte); in i2c_numaker_isr()
614 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
617 I2C_SET_DATA(i2c_base, 0xFF); in i2c_numaker_isr()
618 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_isr()
626 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
630 data_byte = I2C_GET_DATA(i2c_base); in i2c_numaker_isr()
633 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
636 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_isr()
643 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
650 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
653 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk); in i2c_numaker_isr()
660 I2C_SET_CONTROL_REG(i2c_base, I2C_CTL0_SI_Msk | I2C_CTL0_AA_Msk); in i2c_numaker_isr()
764 .i2c_base = (I2C_T *) DT_INST_REG_ADDR(inst), \