Searched refs:I2C_REG (Results 1 – 1 of 1) sorted by relevance
/Zephyr-latest/drivers/i2c/ |
D | i2c_sifive.c | 22 #define I2C_REG(config, reg) ((mem_addr_t) ((config)->base + reg)) macro 23 #define IS_SET(config, reg, value) (sys_read8(I2C_REG(config, reg)) & (value)) 90 sys_write8((addr | rw_flag), I2C_REG(config, REG_TRANSMIT)); in i2c_sifive_send_addr() 96 sys_write8(command, I2C_REG(config, REG_COMMAND)); in i2c_sifive_send_addr() 129 sys_write8((msg->buf)[i], I2C_REG(config, REG_TRANSMIT)); in i2c_sifive_write_msg() 143 sys_write8(command, I2C_REG(config, REG_COMMAND)); in i2c_sifive_write_msg() 186 sys_write8(command, I2C_REG(config, REG_COMMAND)); in i2c_sifive_read_msg() 193 (msg->buf)[i] = sys_read8(I2C_REG(config, REG_RECEIVE)); in i2c_sifive_read_msg() 219 sys_write8(0, I2C_REG(config, REG_CONTROL)); in i2c_sifive_configure() 241 sys_write8((uint8_t) (0xFF & prescale), I2C_REG(config, REG_PRESCALE_LOW)); in i2c_sifive_configure() [all …]
|