support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

Fork of C027_Support by u-blox

Revision:
83:71e3b8bc9ab8
Parent:
74:208e3e32d263
--- a/Relax.h	Wed May 28 07:14:21 2014 +0000
+++ b/Relax.h	Wed May 28 14:53:37 2014 +0000
@@ -2,15 +2,14 @@
 
 #include "mbed.h"
 
-// declare the osDelay (usually from cmsis_os.h)
-extern "C" void osDelay(uint32_t ms);
-
-/** A wait function that is independent whether the OS is includes or not
-    if rtos is included the Thread will yield for a certain time 
-    otherwise (without rtos) it will just stay in a busy loop.
-    
-    \param ms number of milliseconds to wait
-*/
-inline void RELAX_MS(int ms) { 
-    osDelay(ms); 
-}
\ No newline at end of file
+#ifdef USING_RTOS
+#include "rtos.h"
+inline void RELAX_MS(unsigned int ms) {
+    if (ms) Thread::wait(ms);
+    else    Thread::yield();
+}
+#else
+inline void RELAX_MS(unsigned int ms) {
+    if (ms) wait_ms(ms);
+}
+#endif