aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/f1/other/i2c_stts75_sensor/stts75.h
diff options
context:
space:
mode:
authorStephen Caudle2011-10-31 00:16:37 -0400
committerStephen Caudle2011-10-31 00:16:37 -0400
commit580d25a84baaa160b0afdc096e9aa1e8ca1c2d2b (patch)
treed3df10cb7a99745eafabe15a0ec286dc9923b4e8 /examples/stm32/f1/other/i2c_stts75_sensor/stts75.h
parent68d2e0d1e3c587e18eef6a6ef9c40b3549b2f9e7 (diff)
Move STM32 example projects in family specific folders
Diffstat (limited to 'examples/stm32/f1/other/i2c_stts75_sensor/stts75.h')
-rw-r--r--examples/stm32/f1/other/i2c_stts75_sensor/stts75.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/stm32/f1/other/i2c_stts75_sensor/stts75.h b/examples/stm32/f1/other/i2c_stts75_sensor/stts75.h
new file mode 100644
index 0000000..57f6190
--- /dev/null
+++ b/examples/stm32/f1/other/i2c_stts75_sensor/stts75.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef STTS75_H
+#define STTS75_H
+
+#include <stdint.h>
+
+#define STTS75_SENSOR0 0x48
+#define STTS75_SENSOR1 0x49
+#define STTS75_SENSOR2 0x4a
+#define STTS75_SENSOR3 0x4b
+#define STTS75_SENSOR4 0x4c
+#define STTS75_SENSOR5 0x4d
+#define STTS75_SENSOR6 0x4e
+#define STTS75_SENSOR7 0x4f
+
+void stts75_write_config(u32 i2c, u8 sensor);
+void stts75_write_temp_os(u32 i2c, u8 sensor, u16 temp_os);
+void stts75_write_temp_hyst(u32 i2c, u8 sensor, u16 temp_hyst);
+u16 stts75_read_temperature(u32 i2c, u8 sensor);
+
+#endif