2022-10-06 17:16:54 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "unity.h"
|
|
|
|
#include "unity_test_runner.h"
|
|
|
|
#include "unity_test_utils_memory.h"
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
2024-05-07 14:56:16 -04:00
|
|
|
#include "dev_msc.h"
|
|
|
|
#include "dev_hid.h"
|
2022-10-06 17:16:54 -04:00
|
|
|
#include "test_hcd_common.h"
|
|
|
|
|
|
|
|
void setUp(void)
|
|
|
|
{
|
|
|
|
unity_utils_record_free_mem();
|
2024-05-07 14:56:16 -04:00
|
|
|
dev_msc_init();
|
|
|
|
dev_hid_init();
|
2022-10-06 17:16:54 -04:00
|
|
|
port_hdl = test_hcd_setup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void tearDown(void)
|
|
|
|
{
|
2024-05-06 17:17:16 -04:00
|
|
|
// Short delay to allow task to be cleaned up
|
2022-10-06 17:16:54 -04:00
|
|
|
vTaskDelay(10);
|
|
|
|
test_hcd_teardown(port_hdl);
|
|
|
|
port_hdl = NULL;
|
|
|
|
unity_utils_evaluate_leaks();
|
|
|
|
}
|
|
|
|
|
|
|
|
void app_main(void)
|
|
|
|
{
|
|
|
|
// ____ ___ ___________________ __ __
|
|
|
|
// | | \/ _____/\______ \ _/ |_ ____ _______/ |_
|
|
|
|
// | | /\_____ \ | | _/ \ __\/ __ \ / ___/\ __\.
|
|
|
|
// | | / / \ | | \ | | \ ___/ \___ \ | |
|
|
|
|
// |______/ /_______ / |______ / |__| \___ >____ > |__|
|
|
|
|
// \/ \/ \/ \/
|
|
|
|
printf(" ____ ___ ___________________ __ __ \r\n");
|
|
|
|
printf("| | \\/ _____/\\______ \\ _/ |_ ____ _______/ |_ \r\n");
|
|
|
|
printf("| | /\\_____ \\ | | _/ \\ __\\/ __ \\ / ___/\\ __\\\r\n");
|
|
|
|
printf("| | / / \\ | | \\ | | \\ ___/ \\___ \\ | | \r\n");
|
|
|
|
printf("|______/ /_______ / |______ / |__| \\___ >____ > |__| \r\n");
|
|
|
|
printf(" \\/ \\/ \\/ \\/ \r\n");
|
|
|
|
|
|
|
|
unity_utils_setup_heap_record(80);
|
|
|
|
unity_utils_set_leak_level(128);
|
|
|
|
unity_run_menu();
|
|
|
|
}
|