Simple USBHost library for LPC4088. Backward compatibility of official-USBHost.
Dependencies: FATFileSystem mbed-rtos
EA LPC4088 QSB専用の簡易USBホストライブラリです。
official-USBHostの下位互換で対応プログラムを僅かな修正で動かすことが出来ます。
examples:
Import programLPC4088-USBHostMSD_HelloWorld
Simple USBHost MSD(USB flash drive) for EA LPC4088 QSB test program
Import programLPC4088-BTstack_example
BTstack for EA LPC4088 QSB example program
Import programLPC4088-USBHostC270_example
Simple USBHost WebCam for EA LPC4088 QSB/LPC1768 test program
USBHost/BaseUsbHostTest.h@0:148fca6fd246, 2014-04-25 (annotated)
- Committer:
- va009039
- Date:
- Fri Apr 25 05:18:55 2014 +0000
- Revision:
- 0:148fca6fd246
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 0:148fca6fd246 | 1 | // BaseUsbHostTest.h 2014/4/22 |
va009039 | 0:148fca6fd246 | 2 | #pragma once |
va009039 | 0:148fca6fd246 | 3 | |
va009039 | 0:148fca6fd246 | 4 | #ifndef CTASSERT |
va009039 | 0:148fca6fd246 | 5 | template <bool>struct CtAssert; |
va009039 | 0:148fca6fd246 | 6 | template <>struct CtAssert<true> {}; |
va009039 | 0:148fca6fd246 | 7 | #define CTASSERT(A) CtAssert<A>(); |
va009039 | 0:148fca6fd246 | 8 | #endif //CTASSERT |
va009039 | 0:148fca6fd246 | 9 | |
va009039 | 0:148fca6fd246 | 10 | #ifdef TEST |
va009039 | 0:148fca6fd246 | 11 | //#define USB_TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} |
va009039 | 0:148fca6fd246 | 12 | #define TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__,#A);} |
va009039 | 0:148fca6fd246 | 13 | #define TEST_ASSERT_TRUE(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} |
va009039 | 0:148fca6fd246 | 14 | #define TEST_ASSERT_FALSE(A) if(A){assert_print(__PRETTY_FUNCTION__, __LINE__, #A);}else{} |
va009039 | 0:148fca6fd246 | 15 | #define TEST_ASSERT_EQUAL(A,B) if (A == B){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} |
va009039 | 0:148fca6fd246 | 16 | void assert_print(const char* pf, int line, const char* msg); |
va009039 | 0:148fca6fd246 | 17 | #else |
va009039 | 0:148fca6fd246 | 18 | #define TEST_ASSERT(A) |
va009039 | 0:148fca6fd246 | 19 | #define TEST_ASSERT_TRUE(A) while(0); |
va009039 | 0:148fca6fd246 | 20 | #define TEST_ASSERT_FALSE(A) while(0); |
va009039 | 0:148fca6fd246 | 21 | #define TEST_ASSERT_EQUAL(A,B) while(0); |
va009039 | 0:148fca6fd246 | 22 | #endif |