nrf51: define and use P0_xx constants

This makes nrf51 consistent with nrf52 and other chips, which do provide
constants for hardware pin numbers.
I've also added the microbit to the smoketest because it is used on
play.tinygo.org. And removed PCA10040 and PCA10056 because they aren't
provided on play.tinygo.org anymore.
This commit is contained in:
Ayke van Laethem
2022-06-28 14:57:18 +02:00
committed by Ron Evans
parent 926c02b6ff
commit 20a46e1b28
5 changed files with 96 additions and 58 deletions
-4
View File
@@ -7,10 +7,6 @@ import (
"device/nrf"
)
func CPUFrequency() uint32 {
return 16000000
}
// Get peripheral and pin number for this GPIO pin.
func (p Pin) getPortPin() (*nrf.GPIO_Type, uint32) {
return nrf.GPIO, uint32(p)