USB host library, support isochronous,bulk,interrupt and control.
Dependents: BaseUsbHost_example BaseJpegDecode_example SimpleJpegDecode_example
Import programBaseUsbHost_example
BaseUsbHost example program
BaseUsbHostTest.h@3:ae77d63a1eda, 2013-01-06 (annotated)
- Committer:
- va009039
- Date:
- Sun Jan 06 11:45:18 2013 +0000
- Revision:
- 3:ae77d63a1eda
- Parent:
- 0:b7d6879637a8
change interface usbhub class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
va009039 | 3:ae77d63a1eda | 1 | // BaseUsbHostTest.h 2013/1/5 |
va009039 | 3:ae77d63a1eda | 2 | #pragma once |
va009039 | 3:ae77d63a1eda | 3 | |
va009039 | 3:ae77d63a1eda | 4 | #ifndef CTASSERT |
va009039 | 3:ae77d63a1eda | 5 | template <bool>struct CtAssert; |
va009039 | 3:ae77d63a1eda | 6 | template <>struct CtAssert<true> {}; |
va009039 | 3:ae77d63a1eda | 7 | #define CTASSERT(A) CtAssert<A>(); |
va009039 | 3:ae77d63a1eda | 8 | #endif //CTASSERT |
va009039 | 3:ae77d63a1eda | 9 | |
va009039 | 0:b7d6879637a8 | 10 | #ifdef TEST |
va009039 | 0:b7d6879637a8 | 11 | #define TEST_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; |
va009039 | 0:b7d6879637a8 | 12 | #define TEST_ASSERT_TRUE(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; |
va009039 | 0:b7d6879637a8 | 13 | #define TEST_ASSERT_FALSE(A) while((A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; |
va009039 | 0:b7d6879637a8 | 14 | #define TEST_ASSERT_EQUAL(A,B) while(!(A == B)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);}; |
va009039 | 0:b7d6879637a8 | 15 | #else |
va009039 | 0:b7d6879637a8 | 16 | #define TEST_ASSERT(A) |
va009039 | 0:b7d6879637a8 | 17 | #define TEST_ASSERT_TRUE(A) while(0); |
va009039 | 0:b7d6879637a8 | 18 | #define TEST_ASSERT_FALSE(A) while(0); |
va009039 | 0:b7d6879637a8 | 19 | #define TEST_ASSERT_EQUAL(A,B) while(0); |
va009039 | 0:b7d6879637a8 | 20 | #endif |