summaryrefslogtreecommitdiff
path: root/include/trng.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2017-02-21 14:39:52 +0100
committerchrome-bot <chrome-bot@chromium.org>2017-02-23 11:36:21 -0800
commit4cbf0cc358a2983a76dc1d732cf158dc15de8629 (patch)
tree5e67e076d0c6ea0ee31f6e25d8f13089f96b0833 /include/trng.h
parent569b5e8f0f124f08e2c1e3cab27081dfff2e266c (diff)
downloadchrome-ec-4cbf0cc358a2983a76dc1d732cf158dc15de8629.tar.gz
stm32: add TRNG support
Add a driver for the STM32 True Random Number Generator. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=chrome-os-partner:62991 TEST=adhoc on STM32L, craft console command and generate/dump buffers of random numbers. Change-Id: Ie7ce890cfc36a3b9a277715b17051e3e42fdfc96 Reviewed-on: https://chromium-review.googlesource.com/445777 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/trng.h')
-rw-r--r--include/trng.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/trng.h b/include/trng.h
index fed113c196..ec56829e54 100644
--- a/include/trng.h
+++ b/include/trng.h
@@ -16,6 +16,16 @@
void init_trng(void);
/**
+ * Shutdown the true random number generator.
+ *
+ * The opposite operation of init_trng(), disable the hardware resources
+ * used by the TRNG to save power.
+ *
+ * Not supported by all platforms.
+ **/
+void exit_trng(void);
+
+/**
* Retrieve a 32 bit random value.
*
* Not supported on all platforms.