mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
stm32: add more MCUs with h/w RNG
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
//go:build stm32l0x2
|
||||
// +build stm32l0x2
|
||||
|
||||
package machine
|
||||
@@ -252,3 +253,8 @@ const (
|
||||
ARR_MAX = 0x10000
|
||||
PSC_MAX = 0x10000
|
||||
)
|
||||
|
||||
func initRNG() {
|
||||
stm32.RCC.AHBENR.SetBits(stm32.RCC_AHBENR_RNGEN)
|
||||
stm32.RNG.CR.SetBits(stm32.RNG_CR_RNGEN)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user