Added HTTP API to C027_Support library.

Fork of C027_Support by u-blox

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Wed May 28 14:53:37 2014 +0000
Parent:
82:055dcfcf9dcc
Child:
86:840a86109d4b
Commit message:
disable automatic detection of rtos

Changed in this revision

Relax.cpp Show diff for this revision Revisions of this file
Relax.h Show annotated file Show diff for this revision Revisions of this file
--- a/Relax.cpp	Wed May 28 07:14:21 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-
-#include "Relax.h"
-
-// weak override wait function from cmsis_os.h on non rtos builds
-extern "C" WEAK void osDelay(uint32_t ms) { 
-    wait_ms(ms); 
-}
-
--- 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