aboutsummaryrefslogtreecommitdiffstats
path: root/src/hmc5883.c
diff options
context:
space:
mode:
authorGergő J. Miklós2019-05-12 12:37:47 +0200
committerGergő J. Miklós2019-05-12 12:37:47 +0200
commit7893fa123087328d5721fa27e9ee45130ba5da96 (patch)
treea8debf810075962f1ec2a697b313ad5fc1ba82a2 /src/hmc5883.c
parent5cbc1bcd61ccd50b3c37f3f70083afca13c9a175 (diff)
downloadi2sensors-7893fa123087328d5721fa27e9ee45130ba5da96.tar.gz
i2sensors-7893fa123087328d5721fa27e9ee45130ba5da96.zip
hmc5883 added + some refactoring
Diffstat (limited to 'src/hmc5883.c')
-rw-r--r--src/hmc5883.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/hmc5883.c b/src/hmc5883.c
new file mode 100644
index 0000000..6167f73
--- /dev/null
+++ b/src/hmc5883.c
@@ -0,0 +1,29 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+
+#include "hmc5883.h"
+
+extern int file;
+extern void bus_err(int ern);
+extern void print_help(void);
+unsigned char buf[5];
+
+
+void hmc5883_print_all(void)
+{
+ printf(
+ "00: Temperature data [°C] (reg: 0x00)\n"
+ "01: Configuration [hex] (reg: 0x01)\n"
+ "02: Tos (Overtemp) [°C] (reg: 0x03)\n"
+ "03: Thys (Hysteresis) [°C] (reg: 0x04)\n"
+ "\n");
+}
+
+void hmc5883_read_all(const char *opts) {}
+void hmc5883_read_one(const char *opts) {}
+void hmc5883_conf_set(const char *opts){} \ No newline at end of file