Simple USBHost MSD(USB flash drive) for EA LPC4088 QSB test program
Dependencies: LPC4088-USBHost mbed
EA LPC4088をUSBホストにしてUSBフラッシュメモリ(USB flash drive)を読み書きするテストプログラムです。
https://bitbucket.org/va009039/lpc4088_usbhost
Diff: LPC4088-USBHost/USBHost/BaseUsbHostTest.h
- Revision:
- 0:11152e69fc05
diff -r 000000000000 -r 11152e69fc05 LPC4088-USBHost/USBHost/BaseUsbHostTest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LPC4088-USBHost/USBHost/BaseUsbHostTest.h Tue Apr 22 10:54:52 2014 +0000 @@ -0,0 +1,22 @@ +// BaseUsbHostTest.h 2014/4/22 +#pragma once + +#ifndef CTASSERT +template <bool>struct CtAssert; +template <>struct CtAssert<true> {}; +#define CTASSERT(A) CtAssert<A>(); +#endif //CTASSERT + +#ifdef TEST +//#define USB_TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} +#define TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__,#A);} +#define TEST_ASSERT_TRUE(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} +#define TEST_ASSERT_FALSE(A) if(A){assert_print(__PRETTY_FUNCTION__, __LINE__, #A);}else{} +#define TEST_ASSERT_EQUAL(A,B) if (A == B){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} +void assert_print(const char* pf, int line, const char* msg); +#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