aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/board_pyportal.go
diff options
context:
space:
mode:
authorsago35 <[email protected]>2020-06-05 15:14:31 +0900
committerGitHub <[email protected]>2020-06-05 08:14:31 +0200
commit0c880ec44c3199cebbdf3611eba331d5b683afdd (patch)
tree2aa1abb35635146fa707b4dbcb8f612129823350 /src/machine/board_pyportal.go
parent64d51b215f63a3b178c6337ab252086d16003ff7 (diff)
downloadtinygo-0c880ec44c3199cebbdf3611eba331d5b683afdd.tar.gz
tinygo-0c880ec44c3199cebbdf3611eba331d5b683afdd.zip
Standardize SAMD51 UART settings (#1155)
* machine/samd51: standardize samd51 uart settings
Diffstat (limited to 'src/machine/board_pyportal.go')
-rw-r--r--src/machine/board_pyportal.go29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/machine/board_pyportal.go b/src/machine/board_pyportal.go
index 7000631ef..2eaf0b880 100644
--- a/src/machine/board_pyportal.go
+++ b/src/machine/board_pyportal.go
@@ -1,11 +1,7 @@
-// +build sam,atsamd51,pyportal
+// +build pyportal
package machine
-import (
- "device/sam"
-)
-
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0xf01669ef
@@ -104,10 +100,10 @@ const (
USBCDC_DP_PIN = PA25
)
-// TODO: add configuration for UART on SERCOM4 that is connected to TX/RX of ESP32
+// UART1 aka NINA_TX/NINA_RX
const (
- UART_TX_PIN = NoPin
- UART_RX_PIN = NoPin
+ UART_TX_PIN = D1
+ UART_RX_PIN = D0
)
// I2C pins
@@ -116,14 +112,6 @@ const (
SCL_PIN = PB03 // SCL: SERCOM2/PAD[1]
)
-// I2C on the PyPortal.
-var (
- I2C0 = I2C{
- Bus: sam.SERCOM5_I2CM,
- SERCOM: 5,
- }
-)
-
// SPI pins
const (
SPI0_SCK_PIN = PA13 // SCK: SERCOM1/PAD[1]
@@ -135,15 +123,6 @@ const (
NINA_SCK = SPI0_SCK_PIN
)
-// SPI on the PyPortal.
-var (
- SPI0 = SPI{
- Bus: sam.SERCOM2_SPIM,
- SERCOM: 2,
- }
- NINA_SPI = SPI0
-)
-
// USB CDC identifiers
const (
usb_STRING_PRODUCT = "Adafruit PyPortal M4"