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

driver/rcinput: drop unused gettimeofday code
This commit is contained in:
martii
2014-02-25 00:09:14 +01:00
committed by svenhoefer
parent 9184ac6266
commit 7826ab0fca
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