summaryrefslogtreecommitdiff
path: root/logs.h
diff options
context:
space:
mode:
authorOlivier Gayot <og@satcom1.com>2016-04-09 10:28:03 +0200
committerOlivier Gayot <og@satcom1.com>2016-04-09 10:28:03 +0200
commite55eca19ef0e0c03832e8195ec3a11ff4e3903ce (patch)
tree98195abd377f02d4cf5208c0cd2d501147367da7 /logs.h
initial commit - read the raw values and send them
Signed-off-by: Olivier Gayot <og@satcom1.com>
Diffstat (limited to 'logs.h')
-rw-r--r--logs.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/logs.h b/logs.h
new file mode 100644
index 0000000..4124d03
--- /dev/null
+++ b/logs.h
@@ -0,0 +1,37 @@
+#ifndef LOGS_H
+#define LOGS_H
+
+#include <stdarg.h>
+
+#if 0
+enum {
+ OPCODE_LOGS = 0x89,
+ OPCODE_OK = 0x70,
+ OPCODE_ERR = 0x70,
+};
+
+#define serial_log serial_log_puts
+
+#define serial_log_puts(_str) serial_puts(OPCODE_LOGS, _str);
+#define serial_log_print_dec(_int) serial_print_dec(OPCODE_LOGS, _int)
+#define serial_log_print_hex(_int) serial_print_dec(OPCODE_LOGS, _int)
+
+#define serial_ok(_str) serial_puts(OPCODE_OK, _str);
+#define serial_err(_str) serial_puts(OPCODE_ERR, _str);
+
+#endif
+
+int serial_puts(const char *str);
+int serial_put_string(const char *str);
+int serial_write(uint8_t value);
+int serial_printf(const char *str, ...);
+
+#if 0
+int serial_print_dec(uint8_t opcode, int32_t integer);
+int serial_print_hex(uint8_t opcode, int32_t integer);
+#endif
+
+#endif
+
+
+