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.
Diff: SerialPipe.h
- Revision:
- 13:e2446fcdc246
- Parent:
- 9:e7a5959ffae1
- Child:
- 14:69c3e57ef0f5
diff -r 684b31d5482b -r e2446fcdc246 SerialPipe.h --- a/SerialPipe.h Fri Nov 15 13:33:39 2013 +0000 +++ b/SerialPipe.h Tue Nov 19 08:34:51 2013 +0000 @@ -9,27 +9,30 @@ 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) ; + int writeable(void); + int putc(int c); // blocking + int put(const void* buffer, int length, bool blocking = false); // rx channel int readable(void); - int getc(void); - int get(char* b, int s, bool t = false); -private: + int getc(void); // blocking + int get(void* buffer, int length, bool blocking = false); +protected: + virtual int _getc(); + virtual int _putc(int c); void rxIrqBuf(void); void txIrqBuf(void); -protected: + void txStart(void); 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); + int getLine(char* buffer, int length); };