Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: internal/common.h
- Revision:
- 6:8a87a59d0d21
- Parent:
- 3:2dc2592bae5e
- Child:
- 16:7f1d6d359787
diff -r 8d91a87ebba2 -r 8a87a59d0d21 internal/common.h --- a/internal/common.h Mon Aug 11 04:00:39 2014 -0700 +++ b/internal/common.h Mon Aug 11 13:55:07 2014 -0700 @@ -11,7 +11,6 @@ #pragma once - #include "WiconnectCommands.h" /* Note we need the 2 concats below because arguments to ## @@ -21,6 +20,9 @@ #define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b) #define ct_assert(e) enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)) } +#define wiconnect_assert(_wiconnect, msg, expr) if(!(expr)){_wiconnect->assertLogger.call(msg); for(;;); } + + #ifndef WICONNECT_ASYNC_TIMER_ENABLED #define CHECK_CALLBACK_AVAILABLE(cb) if(cb.isValid()) return WICONNECT_UNSUPPORTED