import sd-reader_source_20120612
[protos/imu.git] / uart.h
diff --git a/uart.h b/uart.h
new file mode 100644 (file)
index 0000000..d94d93d
--- /dev/null
+++ b/uart.h
@@ -0,0 +1,42 @@
+
+/*
+ * Copyright (c) 2006-2012 by Roland Riegel <feedback@roland-riegel.de>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef UART_H
+#define UART_H
+
+#include <stdint.h>
+#include <avr/pgmspace.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void uart_init();
+
+void uart_putc(uint8_t c);
+
+void uart_putc_hex(uint8_t b);
+void uart_putw_hex(uint16_t w);
+void uart_putdw_hex(uint32_t dw);
+
+void uart_putw_dec(uint16_t w);
+void uart_putdw_dec(uint32_t dw);
+
+void uart_puts(const char* str);
+void uart_puts_p(PGM_P str);
+
+uint8_t uart_getc();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+