nrf51: add RNG definitions to registers.h

RNG (Random Number Generator) register definitions from the datasheet

TEST=buildall
BRANCH=NONE
BUG=None

Signed-off-by: Myles Watson <mylesgw@chromium.org>

Change-Id: Id700564edfa8021aa5604ed53f7ccfe8c3c4f6db
Reviewed-on: https://chromium-review.googlesource.com/254111
Tested-by: Myles Watson <mylesgw@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Myles Watson <mylesgw@chromium.org>
This commit is contained in:
Myles Watson
2015-01-09 15:36:13 -08:00
committed by ChromeOS Commit Bot
parent 199edf4be1
commit 9bdbc71c45

View File

@@ -537,6 +537,27 @@
#define NRF51_TIMER0_BITMODE_32 3
/*
* Random Number Generator (RNG)
*/
#define NRF51_RNG_BASE 0x4000D000
/* Tasks */
#define NRF51_RNG_START REG32(NRF51_RNG_BASE + 0x000)
#define NRF51_RNG_STOP REG32(NRF51_RNG_BASE + 0x004)
/* Events */
#define NRF51_RNG_VALRDY REG32(NRF51_RNG_BASE + 0x100)
/* Registers */
#define NRF51_RNG_SHORTS REG32(NRF51_RNG_BASE + 0x200)
#define NRF51_RNG_INTENSET REG32(NRF51_RNG_BASE + 0x304)
#define NRF51_RNG_INTENCLR REG32(NRF51_RNG_BASE + 0x308)
#define NRF51_RNG_CONFIG REG32(NRF51_RNG_BASE + 0x504)
#define NRF51_RNG_VALUE REG32(NRF51_RNG_BASE + 0x508)
/* For RNG Shortcuts */
#define NRF51_RNG_SHORTS_VALRDY_STOP (1 << 0)
/* For RNG Config */
#define NRF51_RNG_DERCEN (1 << 0)
/*
* Watchdog Timer (WDT)
*/