Lines Matching refs:i2c_device
29 i2c_dev_t *i2c_device = py_board_get_node_by_handle(MODULE_I2C, &(driver_obj->i2c_handle)); \
31 if (NULL == i2c_device) { \
101 LOGD(LOG_TAG, "%s: port = %d;\n", __func__, i2c_device->port); in i2c_open()
102 LOGD(LOG_TAG, "%s: address_width = %d;\n", __func__, i2c_device->config.address_width); in i2c_open()
103 LOGD(LOG_TAG, "%s: freq = %d;\n", __func__, i2c_device->config.freq); in i2c_open()
104 LOGD(LOG_TAG, "%s: mode = %d;\n", __func__, i2c_device->config.mode); in i2c_open()
105 LOGD(LOG_TAG, "%s: dev_addr = %d;\n", __func__, i2c_device->config.dev_addr); in i2c_open()
107 if (i2c_device->port >= I2C_CHANNEL_MAX) { in i2c_open()
112 if (g_is_dev_inited[i2c_device->port] == false) { in i2c_open()
113 ret = aos_hal_i2c_init(i2c_device); in i2c_open()
122 g_is_dev_inited[i2c_device->port] = true; in i2c_open()
136 if (g_is_dev_inited[i2c_device->port] == true) { in i2c_close()
137 ret = aos_hal_i2c_finalize(i2c_device); in i2c_close()
139 g_is_dev_inited[i2c_device->port] = false; in i2c_close()
171 …aos_hal_i2c_mem_write(i2c_device, i2c_device->config.dev_addr, buf[0], 1, &buf[1], write_size - 1,… in i2c_write()
198 …ret = aos_hal_i2c_mem_write(i2c_device, i2c_device->config.dev_addr, buf[0], 1, &buf[0], 1, I2C_TI… in i2c_read()
204 …ret = aos_hal_i2c_mem_read(i2c_device, i2c_device->config.dev_addr, buf[0], 1, &buf[0], read_size,… in i2c_read()