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-01-06
Revision:
3:ae77d63a1eda
Parent:
0:b7d6879637a8

File content as of revision 3:ae77d63a1eda:

// 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