driver/rcinput: implement long key press support (but no rcsim/yWeb support at this time)

driver/rcinput: drop unused gettimeofday code


Origin commit data
------------------
Commit: 7826ab0fca
Author: martii <m4rtii@gmx.de>
Date: 2014-02-25 (Tue, 25 Feb 2014)
This commit is contained in:
martii
2014-02-25 00:09:14 +01:00
committed by vanhofen
parent 31c6b829d7
commit d267c7ed24
11 changed files with 215 additions and 146 deletions

View File

@@ -23,6 +23,7 @@
*/
#include <stdint.h>
#include <string.h>
#include <string>
#include <sstream>
@@ -80,4 +81,6 @@ template<class C> std::string to_string(C i)
return s.str();
}
inline void cstrncpy(char *dest, const char * const src, size_t n) { n--; strncpy(dest, src, n); dest[n] = 0; }
inline void cstrncpy(char *dest, const std::string &src, size_t n) { n--; strncpy(dest, src.c_str(), n); dest[n] = 0; }
#endif