aboutsummaryrefslogtreecommitdiff
path: root/src/modules/systemlib/mcu_version.h
diff options
context:
space:
mode:
authorhauptmech <hauptmech@gmail.com>2015-01-19 16:50:52 +1300
committerLorenz Meier <lm@inf.ethz.ch>2015-01-28 10:20:19 +0100
commit5444972347606333dd61206011263e4a2e5d83e8 (patch)
treed309fda7ba918708f5dfbff285cb29bd5ee1d08e /src/modules/systemlib/mcu_version.h
parent4dd06c4c7368e14ae0c5119321095236f7d13fd4 (diff)
downloadpx4-firmware-5444972347606333dd61206011263e4a2e5d83e8.tar.gz
px4-firmware-5444972347606333dd61206011263e4a2e5d83e8.tar.bz2
px4-firmware-5444972347606333dd61206011263e4a2e5d83e8.zip
Add call to access the mcu unique id. Expose via the 'ver' command.
This is prep for verifying calibration parameters against the hardware they were gathered on.
Diffstat (limited to 'src/modules/systemlib/mcu_version.h')
-rw-r--r--src/modules/systemlib/mcu_version.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/systemlib/mcu_version.h b/src/modules/systemlib/mcu_version.h
index 1b3d0aba9..c8a0bf5cd 100644
--- a/src/modules/systemlib/mcu_version.h
+++ b/src/modules/systemlib/mcu_version.h
@@ -33,6 +33,8 @@
#pragma once
+#include <stdint.h>
+
/* magic numbers from reference manual */
enum MCU_REV {
MCU_REV_STM32F4_REV_A = 0x1000,
@@ -42,6 +44,15 @@ enum MCU_REV {
MCU_REV_STM32F4_REV_3 = 0x2001
};
+
+/**
+ * Reports the microcontroller unique id.
+ *
+ * This ID is guaranteed to be unique for every mcu.
+ * @param uid_96_bit A uint32_t[3] array to copy the data to.
+ */
+__EXPORT void mcu_unique_id(uint32_t *uid_96_bit);
+
/**
* Reports the microcontroller version of the main CPU.
*