aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrey Smirnov2012-11-06 16:48:40 -0800
committerAndrey Smirnov2012-11-06 16:48:40 -0800
commit12e178686331fd0a8e3564a9f0e77fece4a04617 (patch)
tree9b55dbd2d16e6950f564ebcfcb4b03898f8a0d6d /include
parent7a5da60e2669c57d7b615aabe16ab851606f8bf1 (diff)
Add a desig_get_unique_id_as_string
This commit adds desig_get_unique_id_as_string which is useful if one wants to use device ID as USB serial number(iSerialNumber), for example.
Diffstat (limited to 'include')
-rw-r--r--include/libopencm3/stm32/f1/desig.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/f1/desig.h b/include/libopencm3/stm32/f1/desig.h
index 74cfb35..6ceb665 100644
--- a/include/libopencm3/stm32/f1/desig.h
+++ b/include/libopencm3/stm32/f1/desig.h
@@ -51,6 +51,15 @@ u16 desig_get_flash_size(void);
*/
void desig_get_unique_id(u32 result[]);
+/**
+ * Read the full 96 bit unique identifier and return it as a
+ * zero-terminated string
+ * @param string memory region to write the result to
+ 8 @param string_len the size of string in bytes
+ */
+void desig_get_unique_id_as_string(char *string,
+ unsigned int string_len);
+
END_DECLS
#endif