Simple USBHost library for LPC4088. Backward compatibility of official-USBHost.
Dependencies: FATFileSystem mbed-rtos
BaseUsbHostTest.h
00001 // BaseUsbHostTest.h 2014/4/22 00002 #pragma once 00003 00004 #ifndef CTASSERT 00005 template <bool>struct CtAssert; 00006 template <>struct CtAssert<true> {}; 00007 #define CTASSERT(A) CtAssert<A>(); 00008 #endif //CTASSERT 00009 00010 #ifdef TEST 00011 //#define USB_TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} 00012 #define TEST_ASSERT(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__,#A);} 00013 #define TEST_ASSERT_TRUE(A) if(A){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} 00014 #define TEST_ASSERT_FALSE(A) if(A){assert_print(__PRETTY_FUNCTION__, __LINE__, #A);}else{} 00015 #define TEST_ASSERT_EQUAL(A,B) if (A == B){}else{assert_print(__PRETTY_FUNCTION__, __LINE__, #A);} 00016 void assert_print(const char* pf, int line, const char* msg); 00017 #else 00018 #define TEST_ASSERT(A) 00019 #define TEST_ASSERT_TRUE(A) while(0); 00020 #define TEST_ASSERT_FALSE(A) while(0); 00021 #define TEST_ASSERT_EQUAL(A,B) while(0); 00022 #endif
Generated on Tue Jul 12 2022 22:44:17 by 1.7.2