1
0
mirror of https://github.com/seahu/rflink.git synced 2025-12-12 17:07:22 +01:00

first commit

This commit is contained in:
Ondrej Lycka
2017-04-29 03:27:02 +02:00
commit 406093e31d
85 changed files with 25806 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
#ifndef _emulate_arduino_h
#define _emulate_arduino_h
#define F(x) x // redefine macro from arduino
// class simulate arduino Serial class
class Ser
{
public:
void ini(void);
void set_send_function(int (*fnc)(const char*, const int)); // can set function for send line etc. by tcp socket, if is NULL no print
void print(void);
void println(void);
void print(const char* s );
void println(const char* s );
void print(int n );
void print(long n );
void println(long n );
void write(const char* s );
void write(const char s);
void println(unsigned long n, int i);
void println(unsigned long* n, int i);
private:
void enter(); // function who call function set in set_send_function()
};
// prototype other function from arduino
long map(long x, long in_min, long in_max, long out_min, long out_max);
#endif