aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/stm32f0_can.h
diff options
context:
space:
mode:
authorEug Krashtan <eug.krashtan@gmail.com>2019-12-28 13:32:43 +0200
committerKevin O'Connor <kevin@koconnor.net>2020-01-14 17:05:28 -0500
commita34dbc7029fc9bbaabf8c13b2ef8f5f4052c12a2 (patch)
treefeb2f93cbe55f7bf5b287b05089d52d40d938e09 /src/stm32/stm32f0_can.h
parent5238c3f872929f2b1bdfe933590456bb52566fe0 (diff)
downloadkutter-a34dbc7029fc9bbaabf8c13b2ef8f5f4052c12a2.tar.gz
kutter-a34dbc7029fc9bbaabf8c13b2ef8f5f4052c12a2.tar.xz
kutter-a34dbc7029fc9bbaabf8c13b2ef8f5f4052c12a2.zip
stm32: STM32F0 CAN feature
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/stm32f0_can.h')
-rw-r--r--src/stm32/stm32f0_can.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/stm32/stm32f0_can.h b/src/stm32/stm32f0_can.h
new file mode 100644
index 00000000..6b3cb2a4
--- /dev/null
+++ b/src/stm32/stm32f0_can.h
@@ -0,0 +1,17 @@
+#ifndef CORE_INC_CAN_H_
+#define CORE_INC_CAN_H_
+
+// Read UUID (6bytes)
+#define PKT_ID_UUID (0x321)
+// Set address (2bytes) to UUID (6b)
+#define PKT_ID_SET (0x322)
+// UUID response from slave (6bytes)
+#define PKT_ID_UUID_RESP (0x323)
+
+#define STM32_UUID_ADDR (0x1FFFF7AC)
+#define SHORT_UUID_LEN (6)
+
+void CanInit(void);
+void CanTransmit(uint32_t id, uint32_t dlc, uint8_t *pkt);
+
+#endif /* CORE_INC_CAN_H_ */