Support for LISA-N101
Fork of C027_Support by
This is a variant of the C027 driver code for the C027N version, i.e. the one with the Neul/Huawei/u-blox Cellular Internet of Things module on board. The AT command interface for this module is entirely different to the AT interface for the other u-blox modules, hence this fork of the driver. Work is underway to rearchitect the original C027 driver so that a merge can be done.
SerialPipe.h
- Committer:
- mazgch
- Date:
- 2013-11-10
- Revision:
- 9:e7a5959ffae1
- Parent:
- 2:b6012cd91657
- Child:
- 13:e2446fcdc246
File content as of revision 9:e7a5959ffae1:
#pragma once #include "mbed.h" #include "Pipe.h" class SerialPipe : public Serial { public: SerialPipe(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL); virtual ~SerialPipe(void); // tx channel int put(const char* b, int s, bool t = false) ; // rx channel int readable(void); int getc(void); int get(char* b, int s, bool t = false); private: void rxIrqBuf(void); void txIrqBuf(void); protected: Pipe<char> _pipeRx; Pipe<char> _pipeTx; }; #define WAIT -1 #define NOT_FOUND 0 // ----------------------------------------------------------------------- class SerialPipeEx : public SerialPipe { public: SerialPipeEx(PinName tx, PinName rx, int rxSize = 128, int txSize = 128, const char* name = NULL); int getLine(char* b, int s); };