blob: 7e4708d47c4ccdb5962a040b6462120d98368757 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/***************************************************************************/
/* Copyright (c) 2024 Microsoft Corporation */
/* Copyright (c) 2026 Eclipse ThreadX contributors */
/* */
/* This program and the accompanying materials are made available under */
/* the terms of the MIT License which is available at */
/* https://opensource.org/licenses/MIT. */
/* */
/* SPDX-License-Identifier: MIT */
/***************************************************************************/
/* Include necessary system files. */
#include "usbx_ux_test_cdc_ecm.h"
/* Define what the initial system looks like. */
#ifdef CTEST
void test_application_define(void *first_unused_memory)
#else
void usbx_msrc73716_cdc_ecm_mac_test_application_define(void *first_unused_memory)
#endif
{
/* Inform user. */
printf("Running MSRC 73716 CDC ECM MAC get Test............................. ");
stepinfo("\n");
ux_test_cdc_ecm_initialize(first_unused_memory);
}
static void post_init_host()
{
UINT status;
UX_DEVICE *device;
ux_test_ignore_all_errors();
/* Modify bLength of CDC Header Functional Descriptor @ 44 (5). */
ux_test_disconnect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_DEVICE_HANDLE_UNKNOWN);
default_device_framework[44] = 0;
ux_test_connect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_SUCCESS && device -> ux_device_state != UX_DEVICE_CONFIGURED);
default_device_framework[44] = 5;
/* Modify bLength of CDC Header Functional Descriptor @ 44 (5). */
ux_test_disconnect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_DEVICE_HANDLE_UNKNOWN);
default_device_framework[44] = 1;
ux_test_connect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_SUCCESS && device -> ux_device_state != UX_DEVICE_CONFIGURED);
default_device_framework[44] = 5;
/* Modify bLength of CDC Header Functional Descriptor @ 44 (5). */
ux_test_disconnect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_DEVICE_HANDLE_UNKNOWN);
default_device_framework[44] = sizeof(default_device_framework)+1;
ux_test_connect_slave_and_host_wait_for_enum_completion();
status = ux_host_stack_device_get(0, &device);
UX_TEST_ASSERT(status == UX_SUCCESS && device -> ux_device_state != UX_DEVICE_CONFIGURED);
default_device_framework[44] = 5;
}
static void post_init_device()
{
}
|