Lines Matching refs:arg
136 static void esp_apptrace_test_timer_isr(void *arg) in esp_apptrace_test_timer_isr() argument
138 esp_apptrace_test_timer_arg_t *tim_arg = (esp_apptrace_test_timer_arg_t *)arg; in esp_apptrace_test_timer_isr()
158 static void esp_apptrace_test_timer_isr_crash(void *arg) in esp_apptrace_test_timer_isr_crash() argument
160 esp_apptrace_test_timer_arg_t *tim_arg = (esp_apptrace_test_timer_arg_t *)arg; in esp_apptrace_test_timer_isr_crash()
184 esp_apptrace_test_task_arg_t *arg = (esp_apptrace_test_task_arg_t *) p; in esp_apptrace_dummy_task() local
187 TickType_t tmo_ticks = arg->data.period / (1000 * portTICK_PERIOD_MS); in esp_apptrace_dummy_task()
189 …mmy task (period %u us, %u timers)", xTaskGetCurrentTaskHandle(), arg->data.period, arg->timers_nu… in esp_apptrace_dummy_task()
191 if (arg->timers_num > 0) { in esp_apptrace_dummy_task()
192 inth = pvPortMalloc(arg->timers_num * sizeof(timer_isr_handle_t)); in esp_apptrace_dummy_task()
197 memset(inth, 0, arg->timers_num * sizeof(timer_isr_handle_t)); in esp_apptrace_dummy_task()
198 for (int i = 0; i < arg->timers_num; i++) { in esp_apptrace_dummy_task()
199 … esp_apptrace_test_timer_init(arg->timers[i].group, arg->timers[i].id, arg->timers[i].data.period); in esp_apptrace_dummy_task()
200 …res = timer_isr_register(arg->timers[i].group, arg->timers[i].id, arg->timers[i].isr_func, &arg->t… in esp_apptrace_dummy_task()
205 *(uint32_t *)arg->timers[i].data.buf = (uint32_t)inth[i] | (1 << 31); in esp_apptrace_dummy_task()
206 …I("%x: start timer %x period %u us", xTaskGetCurrentTaskHandle(), inth[i], arg->timers[i].data.per… in esp_apptrace_dummy_task()
207 res = timer_start(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_dummy_task()
216 while (!arg->stop) { in esp_apptrace_dummy_task()
225 for (int i = 0; i < arg->timers_num; i++) { in esp_apptrace_dummy_task()
226 timer_pause(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_dummy_task()
227 timer_disable_intr(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_dummy_task()
234 xSemaphoreGive(arg->done); in esp_apptrace_dummy_task()
241 esp_apptrace_test_task_arg_t *arg = (esp_apptrace_test_task_arg_t *) p; in esp_apptrace_test_task() local
244 TickType_t tmo_ticks = arg->data.period / (1000 * portTICK_PERIOD_MS); in esp_apptrace_test_task()
246 … stamp mask %x, %u timers)", xTaskGetCurrentTaskHandle(), arg->data.period, arg->data.mask, arg->t… in esp_apptrace_test_task()
248 if (arg->timers_num > 0) { in esp_apptrace_test_task()
249 inth = pvPortMalloc(arg->timers_num * sizeof(timer_isr_handle_t)); in esp_apptrace_test_task()
254 memset(inth, 0, arg->timers_num * sizeof(timer_isr_handle_t)); in esp_apptrace_test_task()
255 for (int i = 0; i < arg->timers_num; i++) { in esp_apptrace_test_task()
256 … esp_apptrace_test_timer_init(arg->timers[i].group, arg->timers[i].id, arg->timers[i].data.period); in esp_apptrace_test_task()
257 …res = timer_isr_register(arg->timers[i].group, arg->timers[i].id, arg->timers[i].isr_func, &arg->t… in esp_apptrace_test_task()
262 …*(uint32_t *)arg->timers[i].data.buf = ((uint32_t)inth[i]) | (1 << 31) | (cpu_hal_get_core_id() ? … in esp_apptrace_test_task()
263 …I("%x: start timer %x period %u us", xTaskGetCurrentTaskHandle(), inth[i], arg->timers[i].data.per… in esp_apptrace_test_task()
264 res = timer_start(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_test_task()
272 …*(uint32_t *)arg->data.buf = (uint32_t)xTaskGetCurrentTaskHandle() | (cpu_hal_get_core_id() ? 0x1 … in esp_apptrace_test_task()
273 arg->data.wr_cnt = 0; in esp_apptrace_test_task()
274 arg->data.wr_err = 0; in esp_apptrace_test_task()
275 while (!arg->stop) { in esp_apptrace_test_task()
276 uint32_t *ts = (uint32_t *)(arg->data.buf + sizeof(uint32_t)); in esp_apptrace_test_task()
278 …memset(arg->data.buf + 2 * sizeof(uint32_t), arg->data.wr_cnt & arg->data.mask, arg->data.buf_sz -… in esp_apptrace_test_task()
280 if (arg->nowait) { in esp_apptrace_test_task()
281 res = ESP_APPTRACE_TEST_WRITE_NOWAIT(arg->data.buf, arg->data.buf_sz); in esp_apptrace_test_task()
283 res = ESP_APPTRACE_TEST_WRITE(arg->data.buf, arg->data.buf_sz); in esp_apptrace_test_task()
287 …Failed to write trace %d %x!", xTaskGetCurrentTaskHandle(), res, arg->data.wr_cnt & arg->data.mask… in esp_apptrace_test_task()
288 if (arg->data.wr_err == ESP_APPTRACE_TEST_PRN_WRERR_MAX) { in esp_apptrace_test_task()
294 … bytes, %x", xTaskGetCurrentTaskHandle(), *ts, arg->data.wr_cnt, arg->data.buf_sz, arg->data.wr_cn… in esp_apptrace_test_task()
296 arg->data.wr_err = 0; in esp_apptrace_test_task()
298 arg->data.wr_cnt++; in esp_apptrace_test_task()
306 for (int i = 0; i < arg->timers_num; i++) { in esp_apptrace_test_task()
307 timer_pause(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_test_task()
308 timer_disable_intr(arg->timers[i].group, arg->timers[i].id); in esp_apptrace_test_task()
315 xSemaphoreGive(arg->done); in esp_apptrace_test_task()
322 esp_apptrace_test_task_arg_t *arg = (esp_apptrace_test_task_arg_t *) p; in esp_apptrace_test_task_crash() local
325 … stamp mask %x, %u timers)", xTaskGetCurrentTaskHandle(), arg->data.period, arg->data.mask, arg->t… in esp_apptrace_test_task_crash()
327 arg->data.wr_cnt = 0; in esp_apptrace_test_task_crash()
328 *(uint32_t *)arg->data.buf = (uint32_t)xTaskGetCurrentTaskHandle(); in esp_apptrace_test_task_crash()
330 uint32_t *ts = (uint32_t *)(arg->data.buf + sizeof(uint32_t)); in esp_apptrace_test_task_crash()
332 …memset(arg->data.buf + sizeof(uint32_t), arg->data.wr_cnt & arg->data.mask, arg->data.buf_sz - siz… in esp_apptrace_test_task_crash()
333 res = ESP_APPTRACE_TEST_WRITE(arg->data.buf, arg->data.buf_sz); in esp_apptrace_test_task_crash()
335 …Failed to write trace %d %x!", xTaskGetCurrentTaskHandle(), res, arg->data.wr_cnt & arg->data.mask… in esp_apptrace_test_task_crash()
337 …%d %d bytes, %x", xTaskGetCurrentTaskHandle(), arg->data.wr_cnt, arg->data.buf_sz, arg->data.wr_cn… in esp_apptrace_test_task_crash()
339 arg->data.wr_cnt++; in esp_apptrace_test_task_crash()
345 xSemaphoreGive(arg->done); in esp_apptrace_test_task_crash()
739 esp_logtrace_task_t *arg = (esp_logtrace_task_t *) p; in esp_logtrace_task() local
764 xSemaphoreGive(arg->done); in esp_logtrace_task()
813 static void esp_sysview_test_timer_isr(void *arg) in esp_sysview_test_timer_isr() argument
815 esp_sysviewtrace_timer_arg_t *tim_arg = (esp_sysviewtrace_timer_arg_t *)arg; in esp_sysview_test_timer_isr()
825 esp_sysviewtrace_task_arg_t *arg = (esp_sysviewtrace_task_arg_t *) p; in esp_sysviewtrace_test_task() local
831 if (arg->timer) { in esp_sysviewtrace_test_task()
832 …esp_err_t res = timer_isr_register(arg->timer->group, arg->timer->timer, esp_sysview_test_timer_is… in esp_sysviewtrace_test_task()
837 res = timer_start(arg->timer->group, arg->timer->timer); in esp_sysviewtrace_test_task()
847 printf("%d", arg->id); in esp_sysviewtrace_test_task()
850 if (arg->sync) { in esp_sysviewtrace_test_task()
851 xSemaphoreTake(*arg->sync, portMAX_DELAY); in esp_sysviewtrace_test_task()
853 for (uint32_t k = 0; k < arg->work_count; k++) { in esp_sysviewtrace_test_task()
856 vTaskDelay(arg->sleep_tmo/portTICK_PERIOD_MS); in esp_sysviewtrace_test_task()
858 if (arg->sync) { in esp_sysviewtrace_test_task()
859 xSemaphoreGive(*arg->sync); in esp_sysviewtrace_test_task()
864 xSemaphoreGive(arg->done); in esp_sysviewtrace_test_task()