C027_SupportTest_xively_locationで使用しているC027用ライブラリ
Fork of C027_Support by
下記のプログラム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.
Diff: SerialPipe.h
- Revision:
- 15:5eda64e5b9d1
- Parent:
- 14:69c3e57ef0f5
- Child:
- 16:4a7ba1887e81
--- a/SerialPipe.h Tue Nov 19 09:02:35 2013 +0000 +++ b/SerialPipe.h Fri Nov 22 08:23:30 2013 +0000 @@ -3,22 +3,22 @@ #include "mbed.h" #include "Pipe.h" -class SerialPipe : public Serial +#define _SerialPipeBase SerialBase + +class SerialPipe : public _SerialPipeBase { public: - SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL); + SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128); virtual ~SerialPipe(void); // tx channel int writeable(void); int putc(int c); // blocking - int put(const void* buffer, int length, bool blocking = false); + int put(const void* buffer, int length, bool blocking); // rx channel int readable(void); int getc(void); // blocking - int get(void* buffer, int length, bool blocking = false); + int get(void* buffer, int length, bool blocking); protected: - virtual int _getc(); - virtual int _putc(int c); void rxIrqBuf(void); void txIrqBuf(void); void txStart(void); @@ -33,7 +33,7 @@ class SerialPipeEx : public SerialPipe { public: - SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL); + SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128); int getLine(char* buffer, int length); static int getLine(char* buffer, int length, Pipe<char>* pipe); };