C027_SupportTest_xively_locationで使用しているC027用ライブラリ

Fork of C027_Support by u-blox

下記のプログラムC027_SupportTest_xively_locationで使用しているC027用ライブラリです。

Import programC027_SupportTest_xively_location

インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラム。   CQ publishing Interface 2014.10 issue, C027 3G test program.

オリジナルのライブラリは下記を参照してください。

Import libraryC027_Support

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.

Revision:
75:ce6e12067d0c
Parent:
74:208e3e32d263
Child:
95:8282dbbe1492
--- a/Pipe.h	Thu May 15 22:20:42 2014 +0000
+++ b/Pipe.h	Fri May 16 14:13:00 2014 +0000
@@ -1,4 +1,5 @@
 #pragma once 
+#include "Relax.h"
 
 /** pipe, this class implements a buffered pipe that can be savely 
     written and read between two context. E.g. Written from a task 
@@ -77,7 +78,7 @@
         int j = i;
         i = _inc(i);
         while (i == _r) // = !writeable() 
-            /*wait for space*/;
+            RELAX_MS(0);
         _b[j] = c;
         _w = i; 
         return c;
@@ -100,6 +101,7 @@
                 f = free();
                 if (f > 0) break;     // data avail
                 if (!t) return n - c; // no more space and not blocking
+                RELAX_MS(0);
             }
             // check free space
             if (c < f) f = c;
@@ -144,7 +146,7 @@
     {
         int r = _r;
         while (r == _w) // = !readable()
-            /*wait for data*/;
+            RELAX_MS(0);
         T t = _b[r];
         _r = _inc(r);
         return t;
@@ -167,6 +169,7 @@
                 f = size();
                 if (f)  break;        // free space
                 if (!t) return n - c; // no space and not blocking
+                RELAX_MS(0);
             }
             // check available data
             if (c < f) f = c;