Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LineSerial.h
00001 #ifndef LINE_SERIAL_H 00002 #define LINE_SERIAL_H 00003 00004 #include "mbed.h" 00005 00006 class LineSerial : public Serial 00007 { 00008 public: 00009 LineSerial(PinName tx, PinName rx, const char *name = NULL); 00010 virtual ~LineSerial(); 00011 00012 void allocateReadBuffer(size_t size); 00013 00014 void attachReadLine(void (*func)(const char* str)); 00015 00016 void task(); 00017 00018 private: 00019 char *readBuffer; 00020 size_t readBufferSize; 00021 size_t readBufferCount; 00022 00023 void (*readLineFunc)(const char* data); 00024 00025 bool appendReadBuffer(char data); 00026 bool removeReadBuffer(); 00027 00028 }; 00029 00030 #endif
Generated on Mon Jul 25 2022 17:23:07 by
