mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
nrf: add nrf52840-mdk board
With the help of Chillance on GitHub.
This commit is contained in:
@@ -11,7 +11,17 @@ func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
|
||||
return nrf.GPIO, p.Pin
|
||||
}
|
||||
|
||||
func (uart UART) setPins(tx, rx uint32) {
|
||||
nrf.UART0.PSELTXD = nrf.RegValue(tx)
|
||||
nrf.UART0.PSELRXD = nrf.RegValue(rx)
|
||||
}
|
||||
|
||||
//go:export UART0_IRQHandler
|
||||
func handleUART0() {
|
||||
UART0.handleInterrupt()
|
||||
}
|
||||
|
||||
func (i2c I2C) setPins(scl, sda uint8) {
|
||||
i2c.Bus.PSELSCL = nrf.RegValue(scl)
|
||||
i2c.Bus.PSELSDA = nrf.RegValue(sda)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user