Skip to content

Commit b1c70d8

Browse files
aykevldeadprogram
authored andcommitted
nrf: add CPU frequency
1 parent 714d983 commit b1c70d8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/machine/machine_nrf51.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"device/nrf"
77
)
88

9+
const CPU_FREQUENCY = 16000000
10+
911
// Get peripheral and pin number for this GPIO pin.
1012
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
1113
return nrf.GPIO, p.Pin

src/machine/machine_nrf52.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"unsafe"
88
)
99

10+
const CPU_FREQUENCY = 64000000
11+
1012
// Get peripheral and pin number for this GPIO pin.
1113
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
1214
return nrf.P0, p.Pin

src/machine/machine_nrf52840.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"unsafe"
88
)
99

10+
const CPU_FREQUENCY = 64000000
11+
1012
// Get peripheral and pin number for this GPIO pin.
1113
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
1214
if p.Pin >= 32 {

0 commit comments

Comments
 (0)