Lines Matching refs:SPI_CHECK
173 #define SPI_CHECK(a, str, ret_val) ESP_RETURN_ON_FALSE_ISR(a, ret_val, SPI_TAG, str) macro
215 SPI_CHECK(bus_attr != NULL, "host_id not initialized", ESP_ERR_INVALID_STATE); in spi_master_init_driver()
216 …SPI_CHECK(bus_attr->lock != NULL, "SPI Master cannot attach to bus. (Check CONFIG_SPI_FLASH_SHARE_… in spi_master_init_driver()
236 … SPI_CHECK(bus_attr->bus_cfg.isr_cpu_id <= INTR_CPU_ID_1, "invalid core id", ESP_ERR_INVALID_ARG); in spi_master_init_driver()
290 SPI_CHECK(host != NULL, "host_id not in use", ESP_ERR_INVALID_STATE); in spi_master_deinit_driver()
293 SPI_CHECK(is_valid_host(host_id), "invalid host_id", ESP_ERR_INVALID_ARG); in spi_master_deinit_driver()
297 SPI_CHECK(host->device[x] == NULL, "not all CSses freed", ESP_ERR_INVALID_STATE); in spi_master_deinit_driver()
345 SPI_CHECK(is_valid_host(host_id), "invalid host", ESP_ERR_INVALID_ARG); in spi_bus_add_device()
356 …SPI_CHECK(dev_config->spics_io_num < 0 || GPIO_IS_VALID_OUTPUT_GPIO(dev_config->spics_io_num), "sp… in spi_bus_add_device()
359 …SPI_CHECK(periph_rtc_dig_clk8m_enable(), "the selected clock not available", ESP_ERR_INVALID_STATE… in spi_bus_add_device()
368 …SPI_CHECK((dev_config->clock_speed_hz > 0) && (dev_config->clock_speed_hz <= clock_source_hz), "in… in spi_bus_add_device()
372 …SPI_CHECK(dev_config->cs_ena_pretrans <= 1 || (dev_config->address_bits == 0 && dev_config->comman… in spi_bus_add_device()
378 …SPI_CHECK(dev_config->post_cb != NULL, "use feature flag 'SPI_DEVICE_NO_RETURN_RESULT' but no post… in spi_bus_add_device()
393 SPI_CHECK(freecs != -1, "no free cs pins for the host", ESP_ERR_NOT_FOUND); in spi_bus_add_device()
415 SPI_CHECK(ret == ESP_OK, "assigned clock speed not supported", ret); in spi_bus_add_device()
493 SPI_CHECK(handle!=NULL, "invalid handle", ESP_ERR_INVALID_ARG); in spi_bus_remove_device()
496 …SPI_CHECK(uxQueueMessagesWaiting(handle->trans_queue)==0, "Have unfinished transactions", ESP_ERR_… in spi_bus_remove_device()
497 …SPI_CHECK(handle->host->cur_cs == DEV_NUM_MAX || handle->host->device[handle->host->cur_cs] != han… in spi_bus_remove_device()
499 …SPI_CHECK(uxQueueMessagesWaiting(handle->ret_queue)==0, "Have unfinished transactions", ESP_ERR_IN… in spi_bus_remove_device()
763 SPI_CHECK(handle!=NULL, "invalid dev handle", ESP_ERR_INVALID_ARG); in check_trans_valid()
774 …SPI_CHECK((trans_desc->flags & SPI_TRANS_USE_RXDATA)==0 || trans_desc->rxlength <= 32, "SPI_TRANS_… in check_trans_valid()
775 …SPI_CHECK((trans_desc->flags & SPI_TRANS_USE_TXDATA)==0 || trans_desc->length <= 32, "SPI_TRANS_US… in check_trans_valid()
776 …SPI_CHECK(trans_desc->length <= bus_attr->max_transfer_sz*8, "txdata transfer > host maximum", ESP… in check_trans_valid()
777 …SPI_CHECK(trans_desc->rxlength <= bus_attr->max_transfer_sz*8, "rxdata transfer > host maximum", E… in check_trans_valid()
778 …SPI_CHECK(is_half_duplex || trans_desc->rxlength <= trans_desc->length, "rx length > tx length in … in check_trans_valid()
781 …SPI_CHECK(!(host->id == SPI3_HOST && trans_desc->flags & SPI_TRANS_MODE_OCT), "SPI3 does not suppo… in check_trans_valid()
782 …SPI_CHECK(!((trans_desc->flags & SPI_TRANS_MODE_OCT) && (handle->cfg.flags & SPI_DEVICE_3WIRE)), "… in check_trans_valid()
783 …SPI_CHECK(!((trans_desc->flags & SPI_TRANS_MODE_OCT) && !is_half_duplex), "Incompatible when setti… in check_trans_valid()
785 …SPI_CHECK(!((trans_desc->flags & (SPI_TRANS_MODE_DIO|SPI_TRANS_MODE_QIO)) && (handle->cfg.flags & … in check_trans_valid()
786 …SPI_CHECK(!((trans_desc->flags & (SPI_TRANS_MODE_DIO|SPI_TRANS_MODE_QIO)) && !is_half_duplex), "In… in check_trans_valid()
788 …SPI_CHECK(!is_half_duplex || !bus_attr->dma_enabled || !rx_enabled || !tx_enabled, "SPI half duple… in check_trans_valid()
792 …SPI_CHECK(!is_half_duplex || !tx_enabled || !rx_enabled, "SPI half duplex mode is not supported wh… in check_trans_valid()
793 …SPI_CHECK(!is_half_duplex || !trans_desc->length || !trans_desc->rxlength, "SPI half duplex mode i… in check_trans_valid()
796 …SPI_CHECK(trans_desc->length != 0 || !tx_enabled, "trans tx_buffer should be NULL and SPI_TRANS_US… in check_trans_valid()
799 …SPI_CHECK(!is_half_duplex || trans_desc->rxlength != 0 || !rx_enabled, "trans rx_buffer should be … in check_trans_valid()
806 …SPI_CHECK(!tx_enabled || !rx_enabled || !dummy_enabled || !extra_dummy_enabled, "Dummy phase is no… in check_trans_valid()
809 …SPI_CHECK(trans_desc->length <= SPI_LL_DMA_MAX_BIT_LEN, "txdata transfer > hardware max supported … in check_trans_valid()
810 …SPI_CHECK(trans_desc->rxlength <= SPI_LL_DMA_MAX_BIT_LEN, "rxdata transfer > hardware max supporte… in check_trans_valid()
812 …SPI_CHECK(trans_desc->length <= SPI_LL_CPU_MAX_BIT_LEN, "txdata transfer > hardware max supported … in check_trans_valid()
813 …SPI_CHECK(trans_desc->rxlength <= SPI_LL_CPU_MAX_BIT_LEN, "rxdata transfer > hardware max supporte… in check_trans_valid()
892 …SPI_CHECK(!spi_bus_device_is_polling(handle), "Cannot queue new transaction while previous polling… in spi_device_queue_trans()
937 SPI_CHECK(handle!=NULL, "invalid dev handle", ESP_ERR_INVALID_ARG); in spi_device_get_trans_result()
940 …SPI_CHECK(!(handle->cfg.flags & SPI_DEVICE_NO_RETURN_RESULT), "API not Supported!", ESP_ERR_NOT_SU… in spi_device_get_trans_result()
976 SPI_CHECK(wait==portMAX_DELAY, "acquire finite time not supported now.", ESP_ERR_INVALID_ARG); in spi_device_acquire_bus()
977 …SPI_CHECK(!spi_bus_device_is_polling(device), "Cannot acquire bus when a polling transaction is in… in spi_device_acquire_bus()
1040 …SPI_CHECK(ticks_to_wait == portMAX_DELAY, "currently timeout is not available for polling transact… in spi_device_polling_start()
1043 …SPI_CHECK(!spi_bus_device_is_polling(handle), "Cannot send polling transaction while the previous … in spi_device_polling_start()
1075 SPI_CHECK(handle != NULL, "invalid dev handle", ESP_ERR_INVALID_ARG); in spi_device_polling_end()
1118 SPI_CHECK(is_valid_host(host_id), "invalid host", ESP_ERR_INVALID_ARG); in spi_bus_get_max_transaction_len()