Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FatFileSystem TB6612FNG2 mbed
usb/Usb_td.cpp@0:de03cbbcd0ff, 2015-11-30 (annotated)
- Committer:
- mbed_Cookbook_SE
- Date:
- Mon Nov 30 09:32:15 2015 +0000
- Revision:
- 0:de03cbbcd0ff
??
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 1 | #include "mbed.h" |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 2 | #include "Usb_td.h" |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 3 | //#define __DEBUG |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 4 | #include "mydbg.h" |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 5 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 6 | #define __TEST |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 7 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 8 | #ifdef __TEST |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 9 | #include <queue> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 10 | #endif |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 11 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 12 | template class tdqueue<HCTD*>; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 13 | template class tdqueue<HCITD*>; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 14 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 15 | HCTD* td_reverse(HCTD* td) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 16 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 17 | HCTD* result = NULL; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 18 | HCTD* next; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 19 | while(td) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 20 | next = (HCTD*)td->Next; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 21 | td->Next = (uint32_t)result; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 22 | result = td; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 23 | td = next; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 24 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 25 | return result; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 26 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 27 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 28 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 29 | tdqueue<T>::tdqueue():m_head(NULL),m_tail(NULL) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 30 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 31 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 32 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 33 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 34 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 35 | int tdqueue<T>::size() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 36 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 37 | int n = 0; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 38 | T td = m_head; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 39 | while(td) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 40 | td = (T)td->Next; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 41 | n++; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 42 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 43 | return n; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 44 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 45 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 46 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 47 | bool tdqueue<T>::empty() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 48 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 49 | return (m_head == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 50 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 51 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 52 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 53 | T tdqueue<T>::front() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 54 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 55 | return m_head; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 56 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 57 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 58 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 59 | void tdqueue<T>::pop() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 60 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 61 | T td = m_head; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 62 | if (td) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 63 | m_head = (T)td->Next; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 64 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 65 | if (td == m_tail) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 66 | m_tail = NULL; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 67 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 68 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 69 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 70 | template <class T> |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 71 | void tdqueue<T>::push(T td) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 72 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 73 | td->Next = NULL; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 74 | if (m_tail) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 75 | m_tail->Next = (uint32_t)td; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 76 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 77 | m_tail = td; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 78 | if (m_head == NULL) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 79 | m_head = td; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 80 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 81 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 82 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 83 | #ifdef __TEST |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 84 | static void test_td_list() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 85 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 86 | tdqueue<HCTD*> list; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 87 | HCTD* td1; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 88 | HCTD* td2; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 89 | HCTD* td3; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 90 | HCTD* td4; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 91 | // 0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 92 | DBG_ASSERT(list.size() == 0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 93 | td1 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 94 | DBG_ASSERT(td1 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 95 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 96 | td1 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 97 | DBG_ASSERT(td1 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 98 | // 1 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 99 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 100 | list.push(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 101 | DBG_ASSERT(list.size() == 1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 102 | td2 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 103 | DBG_ASSERT(td2 == td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 104 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 105 | td2 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 106 | DBG_ASSERT(td2 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 107 | DBG_ASSERT(list.size() == 0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 108 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 109 | // 2 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 110 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 111 | td2 = (HCTD*)usb_get_td(2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 112 | list.push(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 113 | list.push(td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 114 | DBG_ASSERT(list.size() == 2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 115 | td3 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 116 | DBG_ASSERT(td3 == td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 117 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 118 | td3 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 119 | DBG_ASSERT(td3 == td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 120 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 121 | td3 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 122 | DBG_ASSERT(td3 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 123 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 124 | usb_free_td((byte*)td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 125 | // 3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 126 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 127 | td2 = (HCTD*)usb_get_td(2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 128 | td3 = (HCTD*)usb_get_td(3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 129 | list.push(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 130 | list.push(td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 131 | list.push(td3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 132 | DBG_ASSERT(list.size() == 3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 133 | td4 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 134 | DBG_ASSERT(td4 == td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 135 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 136 | td4 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 137 | DBG_ASSERT(td4 == td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 138 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 139 | td4 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 140 | DBG_ASSERT(td4 == td3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 141 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 142 | td4 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 143 | DBG_ASSERT(td4 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 144 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 145 | usb_free_td((byte*)td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 146 | usb_free_td((byte*)td3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 147 | // n |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 148 | queue<HCTD*> queue; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 149 | for(int n = 1; n <= 10; n++) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 150 | DBG_ASSERT(list.size() == queue.size()); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 151 | DBG_ASSERT(list.empty() == queue.empty()); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 152 | if (list.empty() || (rand()%10) > 5) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 153 | td1 = (HCTD*)usb_get_td(n); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 154 | if (td1) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 155 | list.push(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 156 | queue.push(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 157 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 158 | //DBG("+ %d %p\n", n, td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 159 | } else { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 160 | td1 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 161 | td2 = queue.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 162 | if (td1 != td2) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 163 | //DBG("td1=%p td2=%p\n", td1, td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 164 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 165 | DBG_ASSERT(td1 == td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 166 | if (td1) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 167 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 168 | queue.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 169 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 170 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 171 | //DBG("- %d %p\n", n, td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 172 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 173 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 174 | while(!list.empty()) { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 175 | td1 = list.front(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 176 | list.pop(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 177 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 178 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 179 | //DBG_ASSERT(0); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 180 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 181 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 182 | static void test_td_reverse() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 183 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 184 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 185 | HCTD* td1; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 186 | HCTD* td2; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 187 | HCTD* td3; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 188 | HCTD* td4; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 189 | // 0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 190 | td1 = NULL; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 191 | td2 = td_reverse(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 192 | DBG_ASSERT(td2 == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 193 | // 1 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 194 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 195 | DBG_ASSERT(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 196 | DBG_ASSERT(td1->Next == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 197 | td2 = td_reverse(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 198 | DBG_ASSERT(td2 == td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 199 | DBG_ASSERT(td2->Next == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 200 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 201 | // 2 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 202 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 203 | DBG_ASSERT(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 204 | td2 = (HCTD*)usb_get_td(2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 205 | DBG_ASSERT(td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 206 | td1->Next = (uint32_t)td2; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 207 | td3 = td_reverse(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 208 | DBG_ASSERT(td3 == td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 209 | DBG_ASSERT(td3->Next == (uint32_t)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 210 | DBG_ASSERT(td1->Next == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 211 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 212 | usb_free_td((byte*)td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 213 | // 3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 214 | td1 = (HCTD*)usb_get_td(1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 215 | td2 = (HCTD*)usb_get_td(2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 216 | td3 = (HCTD*)usb_get_td(3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 217 | td1->Next = (uint32_t)td2; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 218 | td2->Next = (uint32_t)td3; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 219 | td4 = td_reverse(td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 220 | DBG_ASSERT(td4 == td3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 221 | DBG_ASSERT(td3->Next == (uint32_t)td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 222 | DBG_ASSERT(td2->Next == (uint32_t)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 223 | DBG_ASSERT(td1->Next == NULL); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 224 | usb_free_td((byte*)td1); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 225 | usb_free_td((byte*)td2); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 226 | usb_free_td((byte*)td3); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 227 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 228 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 229 | void test_td() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 230 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 231 | test_td_reverse(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 232 | test_td_list(); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 233 | DBG("Usb_td.cpp TD test done.\n"); |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 234 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 235 | #else //__TEST |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 236 | void test_td() |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 237 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 238 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 239 | } |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 240 | #endif //__TEST |