Lines Matching refs:context

24 static void local_test_init(void** context);
25 static void local_test_deinit(void* context);
26 static void local_test_loop(const void *test_param, void* context);
44 spitest_context_t* context = (spitest_context_t*)*arg; in local_test_init() local
45 TEST_ASSERT(context!=NULL); in local_test_init()
46 context->slave_context = (spi_slave_task_context_t){}; in local_test_init()
47 esp_err_t err = init_slave_context( &context->slave_context); in local_test_init()
50 …xTaskCreate(spitest_slave_task, "spi_slave", 4096, &context->slave_context, 0, &context->handle_sl… in local_test_init()
55 spitest_context_t* context = arg; in local_test_deinit() local
56 vTaskDelete(context->handle_slave); in local_test_deinit()
57 context->handle_slave = 0; in local_test_deinit()
58 deinit_slave_context(&context->slave_context); in local_test_deinit()
61 …rt(spi_device_handle_t *spi, int freq, const spitest_param_set_t* pset, spitest_context_t* context) in local_test_start() argument
134 if (context) { in local_test_start()
136 memset(context->master_rxbuf, 0x66, sizeof(context->master_rxbuf)); in local_test_start()
149 spitest_context_t *context = arg2; in local_test_loop() local
151 spitest_init_transactions(pset, context); in local_test_loop()
169 local_test_start(&spi, freq, pset, context); in local_test_loop()
173 slave_txdata_t *txdata = &context->slave_trans[k]; in local_test_loop()
183 spi_transaction_t *t = &context->master_trans[k]; in local_test_loop()
640 static void test_master_init(void** context);
641 static void test_master_deinit(void* context);
642 static void test_master_loop(const void *test_cfg, void* context);
651 static void test_slave_init(void** context);
652 static void test_slave_deinit(void* context);
653 static void test_slave_loop(const void *test_cfg, void* context);
671 spitest_context_t* context = *arg; in test_master_init() local
672 TEST_ASSERT(context!=NULL); in test_master_init()
673 context->slave_context = (spi_slave_task_context_t){}; in test_master_init()
674 esp_err_t err = init_slave_context(&context->slave_context); in test_master_init()
680 spitest_context_t* context = (spitest_context_t*)arg; in test_master_deinit() local
681 deinit_slave_context(&context->slave_context); in test_master_deinit()
684 …rt(spi_device_handle_t *spi, int freq, const spitest_param_set_t* pset, spitest_context_t* context) in test_master_start() argument
727 length = context->master_trans[i].length; in test_master_start()
729 length = context->master_trans[i].rxlength; in test_master_start()
733 ptr[1] = (uint32_t)context->slave_trans[i].start; in test_master_start()
734 if (context->master_trans[i].tx_buffer!=NULL) { in test_master_start()
735 … memcpy(ptr+2, context->master_trans[i].tx_buffer, (context->master_trans[i].length+7)/8); in test_master_start()
738 …xRingbufferSend(context->slave_context.data_received, slave_buffer, 8+(length+7)/8, portMAX_DELAY); in test_master_start()
740 memset(context->master_rxbuf, 0x66, sizeof(context->master_rxbuf)); in test_master_start()
746 spitest_context_t* context = (spitest_context_t*)arg2; in test_master_loop() local
748 spitest_init_transactions(test_cfg, context); in test_master_loop()
758 test_master_start(&spi, freq, test_cfg, context); in test_master_loop()
768 spi_transaction_t *t = &context->master_trans[j]; in test_master_loop()
774 …slave_rxdata_t *rcv_data = xRingbufferReceive( context->slave_context.data_received, &rcv_len, por… in test_master_loop()
789 vRingbufferReturnItem( context->slave_context.data_received, rcv_data ); in test_master_loop()
800 spitest_context_t* context = (spitest_context_t*)*arg; in test_slave_init() local
801 TEST_ASSERT(context!=NULL); in test_slave_init()
802 context->slave_context = (spi_slave_task_context_t){}; in test_slave_init()
803 esp_err_t err = init_slave_context( &context->slave_context ); in test_slave_init()
806 …xTaskCreate( spitest_slave_task, "spi_slave", 4096, &context->slave_context, 0, &context->handle_s… in test_slave_init()
811 spitest_context_t* context = (spitest_context_t*)arg; in test_slave_deinit() local
812 vTaskDelete( context->handle_slave ); in test_slave_deinit()
813 context->handle_slave = 0; in test_slave_deinit()
815 deinit_slave_context(&context->slave_context); in test_slave_deinit()
818 …tic void timing_slave_start(int speed, const spitest_param_set_t* pset, spitest_context_t *context) in timing_slave_start() argument
839 …memcpy(context->master_trans[i].rx_buffer, context->slave_trans[i].start, (context->master_trans[i… in timing_slave_start()
841 …memcpy(context->master_trans[i].rx_buffer, context->slave_trans[i].start, (context->master_trans[i… in timing_slave_start()
849 spitest_context_t* context = (spitest_context_t*)arg2; in test_slave_loop() local
851 spitest_init_transactions(pset, context); in test_slave_loop()
861 timing_slave_start(freq, pset, context); in test_slave_loop()
865 … xQueueSend( context->slave_context.data_to_send, &context->slave_trans[i], portMAX_DELAY ); in test_slave_loop()
878 spi_transaction_t *t = &context->master_trans[i]; in test_slave_loop()
883 …slave_rxdata_t *rcv_data = xRingbufferReceive( context->slave_context.data_received, &rcv_len, por… in test_slave_loop()
892 vRingbufferReturnItem( context->slave_context.data_received, rcv_data ); in test_slave_loop()