Commit a9eec1a2 authored by ahoms's avatar ahoms
Browse files

* added Espia::serFlush


git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@53 45c4679d-1946-429d-baad-37912b19538b
parent c61935e0
...@@ -24,6 +24,7 @@ class Espia ...@@ -24,6 +24,7 @@ class Espia
void serRead(std::string& buffer, int len, double timeout); void serRead(std::string& buffer, int len, double timeout);
void serReadStr(std::string& buffer, int len, void serReadStr(std::string& buffer, int len,
const std::string& term, double timeout); const std::string& term, double timeout);
void serFlush();
static void throwError(int ret, std::string file, std::string func, static void throwError(int ret, std::string file, std::string func,
int line); int line);
......
...@@ -67,6 +67,11 @@ void Espia::serReadStr(string& buffer, int len, const string& term, ...@@ -67,6 +67,11 @@ void Espia::serReadStr(string& buffer, int len, const string& term,
buffer.resize(ret_len); buffer.resize(ret_len);
} }
void Espia::serFlush()
{
CHECK_CALL(espia_ser_flush(m_dev));
}
void Espia::throwError(int ret, string file, string func, int line) void Espia::throwError(int ret, string file, string func, int line)
{ {
string err_desc = string("Espia: ") + espia_strerror(ret); string err_desc = string("Espia: ") + espia_strerror(ret);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment