mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
nrf: add CPU frequency
This commit is contained in:
committed by
Ron Evans
parent
714d98354c
commit
b1c70d85f7
@@ -6,6 +6,8 @@ import (
|
||||
"device/nrf"
|
||||
)
|
||||
|
||||
const CPU_FREQUENCY = 16000000
|
||||
|
||||
// Get peripheral and pin number for this GPIO pin.
|
||||
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
|
||||
return nrf.GPIO, p.Pin
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const CPU_FREQUENCY = 64000000
|
||||
|
||||
// Get peripheral and pin number for this GPIO pin.
|
||||
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
|
||||
return nrf.P0, p.Pin
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const CPU_FREQUENCY = 64000000
|
||||
|
||||
// Get peripheral and pin number for this GPIO pin.
|
||||
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
|
||||
if p.Pin >= 32 {
|
||||
|
||||
Reference in New Issue
Block a user