summaryrefslogtreecommitdiff
path: root/arduino/logs.cpp
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2016-04-09 10:56:10 +0200
committerOlivier Gayot <duskcoder@gmail.com>2016-04-09 10:56:10 +0200
commite75fb7c47b640ea329984d95fc9f4b2d7cd3efe4 (patch)
tree934466a0df6bd76828ede2ccd8e4115657409723 /arduino/logs.cpp
parent9aae804a259aca17e7ca48b2dd18e12dde2c21fd (diff)
because arduino is sooooooo frustrating
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'arduino/logs.cpp')
-rw-r--r--arduino/logs.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/arduino/logs.cpp b/arduino/logs.cpp
deleted file mode 100644
index 901fd25..0000000
--- a/arduino/logs.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <stdio.h>
-#include <Arduino.h>
-
-int serial_write(uint8_t val)
-{
- Serial.write(&val, 1);
-}
-
-int serial_put_string(const char *str)
-{
- while (*str) {
- serial_write(*str++);
- }
-
- return 0;
-}
-
-int serial_puts(const char *str)
-{
- serial_put_string(str);
-
- serial_write('\n');
-
- return 0;
-}
-
-int serial_printf(const char *fmt, ...)
-{
- va_list ap;
-
- static char buf[256];
-
- va_start(ap, fmt);
-
- vsnprintf(buf, sizeof(buf), fmt, ap);
-
- serial_put_string(buf);
-
- va_end(ap);
-
- return 0;
-}
-
-#if 0
-int serial_print_dec(uint8_t opcode, int32_t integer)
-{
- Serial.write(&opcode, 1);
- Serial.println(integer, DEC);
- return 0;
-}
-
-int serial_print_hex(uint8_t opcode, int32_t integer)
-{
- Serial.write(&opcode, 1);
- Serial.println(integer, HEX);
- return 0;
-}
-#endif
-
-
-