Lines Matching refs:host_id

195 static esp_err_t spi_master_init_driver(spi_host_device_t host_id)  in spi_master_init_driver()  argument
199 const spi_bus_attr_t* bus_attr = spi_bus_get_attr(host_id); in spi_master_init_driver()
210 .id = host_id, in spi_master_init_driver()
217 if (host_id != SPI1_HOST) { in spi_master_init_driver()
219 err = esp_intr_alloc(spicommon_irqsource_for_host(host_id), in spi_master_init_driver()
230 .dma_in = SPI_LL_GET_HW(host_id), in spi_master_init_driver()
231 .dma_out = SPI_LL_GET_HW(host_id), in spi_master_init_driver()
239 spi_hal_init(&host->hal, host_id, &hal_config); in spi_master_init_driver()
241 if (host_id != SPI1_HOST) { in spi_master_init_driver()
243 spi_bus_lock_handle_t lock = spi_bus_lock_get_by_id(host_id); in spi_master_init_driver()
245 spi_bus_register_destroy_func(host_id, spi_master_deinit_driver, host); in spi_master_init_driver()
248 bus_driver_ctx[host_id] = host; in spi_master_init_driver()
267 int host_id = host->id; in spi_master_deinit_driver() local
268 SPI_CHECK(is_valid_host(host_id), "invalid host_id", ESP_ERR_INVALID_ARG); in spi_master_deinit_driver()
281 bus_driver_ctx[host_id] = NULL; in spi_master_deinit_driver()
304 esp_err_t spi_bus_add_device(spi_host_device_t host_id, const spi_device_interface_config_t *dev_co… in spi_bus_add_device() argument
309 SPI_CHECK(is_valid_host(host_id), "invalid host", ESP_ERR_INVALID_ARG); in spi_bus_add_device()
310 if (bus_driver_ctx[host_id] == NULL) { in spi_bus_add_device()
312 err = spi_master_init_driver(host_id); in spi_bus_add_device()
318 spi_host_t *host = bus_driver_ctx[host_id]; in spi_bus_add_device()
384 spicommon_cs_initialize(host_id, dev_config->spics_io_num, freecs, use_gpio); in spi_bus_add_device()
415 …ESP_LOGD(SPI_TAG, "SPI%d: New device added to CS%d, effective clock: %dkHz", host_id+1, freecs, fr… in spi_bus_add_device()