USB host library, support isochronous,bulk,interrupt and control.

Dependents:   BaseUsbHost_example BaseJpegDecode_example SimpleJpegDecode_example

Import programBaseUsbHost_example

BaseUsbHost example program

BaseUsbHostTest.h

Committer:
va009039
Date:
2013-02-11
Revision:
5:8a2d056e9b38
Parent:
3:ae77d63a1eda

File content as of revision 5:8a2d056e9b38:

// BaseUsbHostTest.h 2013/1/5
#pragma once

#ifndef CTASSERT
template <bool>struct CtAssert;
template <>struct CtAssert<true> {};
#define CTASSERT(A) CtAssert<A>();
#endif //CTASSERT

#ifdef TEST
#define TEST_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
#define TEST_ASSERT_TRUE(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
#define TEST_ASSERT_FALSE(A) while((A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
#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);};
#else
#define TEST_ASSERT(A)
#define TEST_ASSERT_TRUE(A) while(0);
#define TEST_ASSERT_FALSE(A) while(0);
#define TEST_ASSERT_EQUAL(A,B) while(0);
#endif