Lines Matching refs:p_i2c_obj

208 static i2c_obj_t *p_i2c_obj[I2C_NUM_MAX] = {0};  variable
246 if (p_i2c_obj[i2c_num] == NULL) { in i2c_driver_install()
249 p_i2c_obj[i2c_num] = (i2c_obj_t *) calloc(1, sizeof(i2c_obj_t)); in i2c_driver_install()
252 p_i2c_obj[i2c_num] = (i2c_obj_t *) calloc(1, sizeof(i2c_obj_t)); in i2c_driver_install()
254p_i2c_obj[i2c_num] = (i2c_obj_t *) heap_caps_calloc(1, sizeof(i2c_obj_t), MALLOC_CAP_INTERNAL | MA… in i2c_driver_install()
257 if (p_i2c_obj[i2c_num] == NULL) { in i2c_driver_install()
261 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_driver_install()
349 …i2c_isr_register(i2c_num, i2c_isr_handler_default, p_i2c_obj[i2c_num], intr_alloc_flags, &p_i2c_ob… in i2c_driver_install()
358 if (p_i2c_obj[i2c_num]) { in i2c_driver_install()
359 if (p_i2c_obj[i2c_num]->rx_ring_buf) { in i2c_driver_install()
360 vRingbufferDelete(p_i2c_obj[i2c_num]->rx_ring_buf); in i2c_driver_install()
361 p_i2c_obj[i2c_num]->rx_ring_buf = NULL; in i2c_driver_install()
362 p_i2c_obj[i2c_num]->rx_buf_length = 0; in i2c_driver_install()
364 if (p_i2c_obj[i2c_num]->tx_ring_buf) { in i2c_driver_install()
365 vRingbufferDelete(p_i2c_obj[i2c_num]->tx_ring_buf); in i2c_driver_install()
366 p_i2c_obj[i2c_num]->tx_ring_buf = NULL; in i2c_driver_install()
367 p_i2c_obj[i2c_num]->tx_buf_length = 0; in i2c_driver_install()
369 if (p_i2c_obj[i2c_num]->cmd_evt_queue) { in i2c_driver_install()
370 vQueueDelete(p_i2c_obj[i2c_num]->cmd_evt_queue); in i2c_driver_install()
371 p_i2c_obj[i2c_num]->cmd_evt_queue = NULL; in i2c_driver_install()
373 if (p_i2c_obj[i2c_num]->cmd_mux) { in i2c_driver_install()
374 vSemaphoreDelete(p_i2c_obj[i2c_num]->cmd_mux); in i2c_driver_install()
376 if (p_i2c_obj[i2c_num]->slv_rx_mux) { in i2c_driver_install()
377 vSemaphoreDelete(p_i2c_obj[i2c_num]->slv_rx_mux); in i2c_driver_install()
379 if (p_i2c_obj[i2c_num]->slv_tx_mux) { in i2c_driver_install()
380 vSemaphoreDelete(p_i2c_obj[i2c_num]->slv_tx_mux); in i2c_driver_install()
383 if (p_i2c_obj[i2c_num]->pm_lock) { in i2c_driver_install()
384 esp_pm_lock_delete(p_i2c_obj[i2c_num]->pm_lock); in i2c_driver_install()
385 p_i2c_obj[i2c_num]->pm_lock = NULL; in i2c_driver_install()
389 if (p_i2c_obj[i2c_num]->evt_queue_storage) { in i2c_driver_install()
390 free(p_i2c_obj[i2c_num]->evt_queue_storage); in i2c_driver_install()
391 p_i2c_obj[i2c_num]->evt_queue_storage = NULL; in i2c_driver_install()
395 free(p_i2c_obj[i2c_num]); in i2c_driver_install()
396 p_i2c_obj[i2c_num] = NULL; in i2c_driver_install()
403 ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num] != NULL, ESP_FAIL, I2C_TAG, I2C_DRIVER_ERR_STR); in i2c_driver_delete()
405 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_driver_delete()
416 if (p_i2c_obj[i2c_num]->cmd_evt_queue) { in i2c_driver_delete()
417 vQueueDelete(p_i2c_obj[i2c_num]->cmd_evt_queue); in i2c_driver_delete()
418 p_i2c_obj[i2c_num]->cmd_evt_queue = NULL; in i2c_driver_delete()
444 if (p_i2c_obj[i2c_num]->evt_queue_storage) { in i2c_driver_delete()
445 free(p_i2c_obj[i2c_num]->evt_queue_storage); in i2c_driver_delete()
446 p_i2c_obj[i2c_num]->evt_queue_storage = NULL; in i2c_driver_delete()
450 free(p_i2c_obj[i2c_num]); in i2c_driver_delete()
451 p_i2c_obj[i2c_num] = NULL; in i2c_driver_delete()
488 p_i2c_obj[i2c_num]->status = I2C_STATUS_ACK_ERROR; in i2c_isr_handler_default()
491 p_i2c_obj[i2c_num]->status = I2C_STATUS_TIMEOUT; in i2c_isr_handler_default()
494 p_i2c_obj[i2c_num]->status = I2C_STATUS_TIMEOUT; in i2c_isr_handler_default()
730 ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num] != NULL, ESP_FAIL, I2C_TAG, I2C_DRIVER_ERR_STR); in i2c_filter_enable()
1275 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_master_cmd_begin_static()
1398 …ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num] != NULL, ESP_ERR_INVALID_STATE, I2C_TAG, I2C_DRIVER_NOT_INS… in i2c_master_cmd_begin()
1399 …ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num]->mode == I2C_MODE_MASTER, ESP_ERR_INVALID_STATE, I2C_TAG, I… in i2c_master_cmd_begin()
1405 if ( (p_i2c_obj[i2c_num]->intr_alloc_flags & ESP_INTR_FLAG_IRAM) && in i2c_master_cmd_begin()
1414 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_master_cmd_begin()
1508 ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num] != NULL, ESP_FAIL, I2C_TAG, I2C_DRIVER_ERR_STR); in i2c_slave_write_buffer()
1510 …ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num]->mode == I2C_MODE_SLAVE, ESP_FAIL, I2C_TAG, I2C_MODE_SLAVE_… in i2c_slave_write_buffer()
1511 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_slave_write_buffer()
1538 ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num] != NULL, ESP_FAIL, I2C_TAG, I2C_DRIVER_ERR_STR); in i2c_slave_read_buffer()
1540 …ESP_RETURN_ON_FALSE(p_i2c_obj[i2c_num]->mode == I2C_MODE_SLAVE, ESP_FAIL, I2C_TAG, I2C_MODE_SLAVE_… in i2c_slave_read_buffer()
1544 i2c_obj_t *p_i2c = p_i2c_obj[i2c_num]; in i2c_slave_read_buffer()