Lines Matching refs:bus_ctx
77 static spicommon_bus_context_t* bus_ctx[SOC_SPI_PERIPH_NUM] = {&s_mainbus}; variable
227 spicommon_bus_context_t *ctx = bus_ctx[host_id]; in alloc_dma_chan()
283 bus_ctx[host_id] = ctx; in spicommon_dma_chan_alloc()
313 *gdma_handle = bus_ctx[host_id]->tx_channel; in spicommon_gdma_get_handle()
316 *gdma_handle = bus_ctx[host_id]->rx_channel; in spicommon_gdma_get_handle()
327 spicommon_bus_context_t *ctx = bus_ctx[host_id]; in dma_chan_free()
357 free(bus_ctx[host_id]); in spicommon_dma_chan_free()
358 bus_ctx[host_id] = NULL; in spicommon_dma_chan_free()
750 bus_ctx[0]->bus_attr.lock = lock; in spi_bus_main_set_lock()
755 return bus_ctx[host_id]->bus_attr.lock; in spi_bus_lock_get_by_id()
768 SPI_CHECK(bus_ctx[host_id] == NULL, "SPI bus already initialized.", ESP_ERR_INVALID_STATE); in spi_bus_initialize()
790 bus_ctx[host_id] = ctx; in spi_bus_initialize()
863 free(bus_ctx[host_id]); in spi_bus_initialize()
864 bus_ctx[host_id] = NULL; in spi_bus_initialize()
870 if (bus_ctx[host_id] == NULL) return NULL; in spi_bus_get_attr()
872 return &bus_ctx[host_id]->bus_attr; in spi_bus_get_attr()
877 if (bus_ctx[host_id] == NULL) { in spi_bus_free()
882 spicommon_bus_context_t* ctx = bus_ctx[host_id]; in spi_bus_free()
904 bus_ctx[host_id] = NULL; in spi_bus_free()
911 bus_ctx[host_id]->destroy_func = f; in spi_bus_register_destroy_func()
912 bus_ctx[host_id]->destroy_arg = arg; in spi_bus_register_destroy_func()