aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authordeadprogram <[email protected]>2020-07-07 18:52:27 +0200
committerAyke <[email protected]>2020-07-23 22:45:23 +0200
commitd1c4ed664e540e00b3d18ff340d6798c45b382cf (patch)
tree75c135fb8a87e1846f2e8517e077ae01ec9c7b7a /src
parentfdaddf6917a37a243af085ff5de1fc4db448566a (diff)
downloadtinygo-d1c4ed664e540e00b3d18ff340d6798c45b382cf.tar.gz
tinygo-d1c4ed664e540e00b3d18ff340d6798c45b382cf.zip
all: changeover to eliminate all direct use of master/slave terminology
Signed-off-by: deadprogram <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/machine/board_arduino_nano33.go10
-rw-r--r--src/machine/board_bluepill.go6
-rw-r--r--src/machine/board_circuitplay_bluefruit.go6
-rw-r--r--src/machine/board_circuitplay_express.go6
-rw-r--r--src/machine/board_clue_alpha.go8
-rw-r--r--src/machine/board_feather-m0.go6
-rw-r--r--src/machine/board_feather-m4.go6
-rw-r--r--src/machine/board_feather-nrf52840.go6
-rw-r--r--src/machine/board_hifive1b.go12
-rw-r--r--src/machine/board_itsybitsy-m0.go14
-rw-r--r--src/machine/board_itsybitsy-m4.go6
-rw-r--r--src/machine/board_k210.go512
-rw-r--r--src/machine/board_maixbit.go10
-rw-r--r--src/machine/board_metro-m4-airlift.go18
-rw-r--r--src/machine/board_microbit.go6
-rw-r--r--src/machine/board_nrf52840-mdk.go6
-rw-r--r--src/machine/board_nucleof103rb.go6
-rw-r--r--src/machine/board_particle_argon.go14
-rw-r--r--src/machine/board_particle_boron.go14
-rw-r--r--src/machine/board_particle_xenon.go14
-rw-r--r--src/machine/board_pca10031.go6
-rw-r--r--src/machine/board_pca10040.go6
-rw-r--r--src/machine/board_pca10056.go6
-rw-r--r--src/machine/board_pinetime-devkit0.go8
-rw-r--r--src/machine/board_pybadge.go12
-rw-r--r--src/machine/board_pygamer.go12
-rw-r--r--src/machine/board_pyportal.go16
-rw-r--r--src/machine/board_reelboard.go8
-rw-r--r--src/machine/board_stm32f4disco.go12
-rw-r--r--src/machine/board_trinket.go6
-rw-r--r--src/machine/board_wioterminal.go116
-rw-r--r--src/machine/board_x9pro.go18
-rw-r--r--src/machine/board_xiao.go10
-rw-r--r--src/machine/i2s.go24
-rw-r--r--src/machine/machine_atmega.go2
-rw-r--r--src/machine/machine_atsamd21.go34
-rw-r--r--src/machine/machine_atsamd51.go36
-rw-r--r--src/machine/machine_fe310.go14
-rw-r--r--src/machine/machine_generic.go8
-rw-r--r--src/machine/machine_k210.go22
-rw-r--r--src/machine/machine_nrf.go6
-rw-r--r--src/machine/machine_nrf51.go14
-rw-r--r--src/machine/machine_nrf52.go14
-rw-r--r--src/machine/machine_nrf52840.go14
-rw-r--r--src/machine/machine_stm32_moder_gpio.go10
-rw-r--r--src/machine/machine_stm32_spi.go14
-rw-r--r--src/machine/machine_stm32f103xx.go4
-rw-r--r--src/machine/machine_stm32f407.go4
-rw-r--r--src/runtime/interrupt/interrupt_gameboyadvance.go8
49 files changed, 575 insertions, 575 deletions
diff --git a/src/machine/board_arduino_nano33.go b/src/machine/board_arduino_nano33.go
index 4bbba984f..81aa815c8 100644
--- a/src/machine/board_arduino_nano33.go
+++ b/src/machine/board_arduino_nano33.go
@@ -66,15 +66,15 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = D13 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN Pin = D11 // MOSI: SERCOM1/PAD[0]
- SPI0_MISO_PIN Pin = D12 // MISO: SERCOM1/PAD[3]
+ SPI0_SCK_PIN Pin = D13 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN Pin = D11 // SDO: SERCOM1/PAD[0]
+ SPI0_SDI_PIN Pin = D12 // SDI: SERCOM1/PAD[3]
)
// NINA-W102 Pins
const (
- NINA_MOSI Pin = PA12
- NINA_MISO Pin = PA13
+ NINA_SDO Pin = PA12
+ NINA_SDI Pin = PA13
NINA_CS Pin = PA14
NINA_SCK Pin = PA15
NINA_GPIO0 Pin = PA27
diff --git a/src/machine/board_bluepill.go b/src/machine/board_bluepill.go
index e6ba49b40..60725a850 100644
--- a/src/machine/board_bluepill.go
+++ b/src/machine/board_bluepill.go
@@ -74,9 +74,9 @@ func init() {
// SPI pins
const (
- SPI0_SCK_PIN = PA5
- SPI0_MOSI_PIN = PA7
- SPI0_MISO_PIN = PA6
+ SPI0_SCK_PIN = PA5
+ SPI0_SDO_PIN = PA7
+ SPI0_SDI_PIN = PA6
)
// I2C pins
diff --git a/src/machine/board_circuitplay_bluefruit.go b/src/machine/board_circuitplay_bluefruit.go
index 6cb503ad5..91adbd7b1 100644
--- a/src/machine/board_circuitplay_bluefruit.go
+++ b/src/machine/board_circuitplay_bluefruit.go
@@ -72,9 +72,9 @@ const (
// SPI pins (internal flash)
const (
- SPI0_SCK_PIN = P0_19 // SCK
- SPI0_MOSI_PIN = P0_21 // MOSI
- SPI0_MISO_PIN = P0_23 // MISO
+ SPI0_SCK_PIN = P0_19 // SCK
+ SPI0_SDO_PIN = P0_21 // SDO
+ SPI0_SDI_PIN = P0_23 // SDI
)
// USB CDC identifiers
diff --git a/src/machine/board_circuitplay_express.go b/src/machine/board_circuitplay_express.go
index fe315294f..e1fd7be23 100644
--- a/src/machine/board_circuitplay_express.go
+++ b/src/machine/board_circuitplay_express.go
@@ -77,9 +77,9 @@ const (
// SPI pins (internal flash)
const (
- SPI0_SCK_PIN = PA21 // SCK: SERCOM3/PAD[3]
- SPI0_MOSI_PIN = PA20 // MOSI: SERCOM3/PAD[2]
- SPI0_MISO_PIN = PA16 // MISO: SERCOM3/PAD[0]
+ SPI0_SCK_PIN = PA21 // SCK: SERCOM3/PAD[3]
+ SPI0_SDO_PIN = PA20 // SDO: SERCOM3/PAD[2]
+ SPI0_SDI_PIN = PA16 // SDI: SERCOM3/PAD[0]
)
// I2S pins
diff --git a/src/machine/board_clue_alpha.go b/src/machine/board_clue_alpha.go
index d20f356fa..d90b6889b 100644
--- a/src/machine/board_clue_alpha.go
+++ b/src/machine/board_clue_alpha.go
@@ -78,7 +78,7 @@ const (
// 240x240 ST7789 display is connected to these pins (use RowOffset = 80)
TFT_SCK = D29
- TFT_MOSI = D30
+ TFT_SDO = D30
TFT_CS = D31
TFT_DC = D32
TFT_RESET = D33
@@ -116,9 +116,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = D13 // SCK
- SPI0_MOSI_PIN = D15 // MOSI
- SPI0_MISO_PIN = D14 // MISO
+ SPI0_SCK_PIN = D13 // SCK
+ SPI0_SDO_PIN = D15 // SDO
+ SPI0_SDI_PIN = D14 // SDI
)
// USB CDC identifiers
diff --git a/src/machine/board_feather-m0.go b/src/machine/board_feather-m0.go
index af00fc98b..96b4e2e3b 100644
--- a/src/machine/board_feather-m0.go
+++ b/src/machine/board_feather-m0.go
@@ -83,9 +83,9 @@ var (
// SPI pins
const (
- SPI0_SCK_PIN = PB11 // SCK: SERCOM4/PAD[3]
- SPI0_MOSI_PIN = PB10 // MOSI: SERCOM4/PAD[2]
- SPI0_MISO_PIN = PA12 // MISO: SERCOM4/PAD[0]
+ SPI0_SCK_PIN = PB11 // SCK: SERCOM4/PAD[3]
+ SPI0_SDO_PIN = PB10 // SDO: SERCOM4/PAD[2]
+ SPI0_SDI_PIN = PA12 // SDI: SERCOM4/PAD[0]
)
// SPI on the Feather M0.
diff --git a/src/machine/board_feather-m4.go b/src/machine/board_feather-m4.go
index 511834e23..bec23fc88 100644
--- a/src/machine/board_feather-m4.go
+++ b/src/machine/board_feather-m4.go
@@ -63,9 +63,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = D25 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN = D24 // MOSI: SERCOM1/PAD[3]
- SPI0_MISO_PIN = D23 // MISO: SERCOM1/PAD[2]
+ SPI0_SCK_PIN = D25 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN = D24 // SDO: SERCOM1/PAD[3]
+ SPI0_SDI_PIN = D23 // SDI: SERCOM1/PAD[2]
)
// USB CDC identifiers
diff --git a/src/machine/board_feather-nrf52840.go b/src/machine/board_feather-nrf52840.go
index 330042e7d..48bdd6c84 100644
--- a/src/machine/board_feather-nrf52840.go
+++ b/src/machine/board_feather-nrf52840.go
@@ -88,9 +88,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = D26 // SCK
- SPI0_MOSI_PIN = D25 // MOSI
- SPI0_MISO_PIN = D24 // MISO
+ SPI0_SCK_PIN = D26 // SCK
+ SPI0_SDO_PIN = D25 // SDO
+ SPI0_SDI_PIN = D24 // SDI
)
// USB CDC identifiers
diff --git a/src/machine/board_hifive1b.go b/src/machine/board_hifive1b.go
index ff5b40229..10fd4a9f8 100644
--- a/src/machine/board_hifive1b.go
+++ b/src/machine/board_hifive1b.go
@@ -43,13 +43,13 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = NoPin
- SPI0_MOSI_PIN = NoPin
- SPI0_MISO_PIN = NoPin
+ SPI0_SCK_PIN = NoPin
+ SPI0_SDO_PIN = NoPin
+ SPI0_SDI_PIN = NoPin
- SPI1_SCK_PIN = D13
- SPI1_MOSI_PIN = D11
- SPI1_MISO_PIN = D12
+ SPI1_SCK_PIN = D13
+ SPI1_SDO_PIN = D11
+ SPI1_SDI_PIN = D12
)
// I2C pins
diff --git a/src/machine/board_itsybitsy-m0.go b/src/machine/board_itsybitsy-m0.go
index 598edd4a6..62974adcb 100644
--- a/src/machine/board_itsybitsy-m0.go
+++ b/src/machine/board_itsybitsy-m0.go
@@ -83,9 +83,9 @@ var (
// SPI pins
const (
- SPI0_SCK_PIN = PB11 // SCK: SERCOM4/PAD[3]
- SPI0_MOSI_PIN = PB10 // MOSI: SERCOM4/PAD[2]
- SPI0_MISO_PIN = PA12 // MISO: SERCOM4/PAD[0]
+ SPI0_SCK_PIN = PB11 // SCK: SERCOM4/PAD[3]
+ SPI0_SDO_PIN = PB10 // SDO: SERCOM4/PAD[2]
+ SPI0_SDI_PIN = PA12 // SDI: SERCOM4/PAD[0]
)
// SPI on the ItsyBitsy M0.
@@ -98,10 +98,10 @@ var (
// "Internal" SPI pins; SPI flash is attached to these on ItsyBitsy M0
const (
- SPI1_CS_PIN = PA27
- SPI1_SCK_PIN = PB23
- SPI1_MOSI_PIN = PB22
- SPI1_MISO_PIN = PB03
+ SPI1_CS_PIN = PA27
+ SPI1_SCK_PIN = PB23
+ SPI1_SDO_PIN = PB22
+ SPI1_SDI_PIN = PB03
)
// "Internal" SPI on Sercom 5
diff --git a/src/machine/board_itsybitsy-m4.go b/src/machine/board_itsybitsy-m4.go
index 43c9a4ba5..5fef841cb 100644
--- a/src/machine/board_itsybitsy-m4.go
+++ b/src/machine/board_itsybitsy-m4.go
@@ -62,9 +62,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = PA01 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN = PA00 // MOSI: SERCOM1/PAD[0]
- SPI0_MISO_PIN = PB23 // MISO: SERCOM1/PAD[3]
+ SPI0_SCK_PIN = PA01 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN = PA00 // SDO: SERCOM1/PAD[0]
+ SPI0_SDI_PIN = PB23 // SDI: SERCOM1/PAD[3]
)
// USB CDC identifiers
diff --git a/src/machine/board_k210.go b/src/machine/board_k210.go
index 2b934e5ec..60467a689 100644
--- a/src/machine/board_k210.go
+++ b/src/machine/board_k210.go
@@ -61,262 +61,262 @@ type FPIOAFunction uint8
// Every pin on the Kendryte K210 is assigned to an FPIOA function.
// Each pin can be configured with every function below.
const (
- FUNC_JTAG_TCLK FPIOAFunction = 0 // JTAG Test Clock
- FUNC_JTAG_TDI FPIOAFunction = 1 // JTAG Test Data In
- FUNC_JTAG_TMS FPIOAFunction = 2 // JTAG Test Mode Select
- FUNC_JTAG_TDO FPIOAFunction = 3 // JTAG Test Data Out
- FUNC_SPI0_D0 FPIOAFunction = 4 // SPI0 Data 0
- FUNC_SPI0_D1 FPIOAFunction = 5 // SPI0 Data 1
- FUNC_SPI0_D2 FPIOAFunction = 6 // SPI0 Data 2
- FUNC_SPI0_D3 FPIOAFunction = 7 // SPI0 Data 3
- FUNC_SPI0_D4 FPIOAFunction = 8 // SPI0 Data 4
- FUNC_SPI0_D5 FPIOAFunction = 9 // SPI0 Data 5
- FUNC_SPI0_D6 FPIOAFunction = 10 // SPI0 Data 6
- FUNC_SPI0_D7 FPIOAFunction = 11 // SPI0 Data 7
- FUNC_SPI0_SS0 FPIOAFunction = 12 // SPI0 Chip Select 0
- FUNC_SPI0_SS1 FPIOAFunction = 13 // SPI0 Chip Select 1
- FUNC_SPI0_SS2 FPIOAFunction = 14 // SPI0 Chip Select 2
- FUNC_SPI0_SS3 FPIOAFunction = 15 // SPI0 Chip Select 3
- FUNC_SPI0_ARB FPIOAFunction = 16 // SPI0 Arbitration
- FUNC_SPI0_SCLK FPIOAFunction = 17 // SPI0 Serial Clock
- FUNC_UARTHS_RX FPIOAFunction = 18 // UART High speed Receiver
- FUNC_UARTHS_TX FPIOAFunction = 19 // UART High speed Transmitter
- FUNC_RESV6 FPIOAFunction = 20 // Reserved function
- FUNC_RESV7 FPIOAFunction = 21 // Reserved function
- FUNC_CLK_SPI1 FPIOAFunction = 22 // Clock SPI1
- FUNC_CLK_I2C1 FPIOAFunction = 23 // Clock I2C1
- FUNC_GPIOHS0 FPIOAFunction = 24 // GPIO High speed 0
- FUNC_GPIOHS1 FPIOAFunction = 25 // GPIO High speed 1
- FUNC_GPIOHS2 FPIOAFunction = 26 // GPIO High speed 2
- FUNC_GPIOHS3 FPIOAFunction = 27 // GPIO High speed 3
- FUNC_GPIOHS4 FPIOAFunction = 28 // GPIO High speed 4
- FUNC_GPIOHS5 FPIOAFunction = 29 // GPIO High speed 5
- FUNC_GPIOHS6 FPIOAFunction = 30 // GPIO High speed 6
- FUNC_GPIOHS7 FPIOAFunction = 31 // GPIO High speed 7
- FUNC_GPIOHS8 FPIOAFunction = 32 // GPIO High speed 8
- FUNC_GPIOHS9 FPIOAFunction = 33 // GPIO High speed 9
- FUNC_GPIOHS10 FPIOAFunction = 34 // GPIO High speed 10
- FUNC_GPIOHS11 FPIOAFunction = 35 // GPIO High speed 11
- FUNC_GPIOHS12 FPIOAFunction = 36 // GPIO High speed 12
- FUNC_GPIOHS13 FPIOAFunction = 37 // GPIO High speed 13
- FUNC_GPIOHS14 FPIOAFunction = 38 // GPIO High speed 14
- FUNC_GPIOHS15 FPIOAFunction = 39 // GPIO High speed 15
- FUNC_GPIOHS16 FPIOAFunction = 40 // GPIO High speed 16
- FUNC_GPIOHS17 FPIOAFunction = 41 // GPIO High speed 17
- FUNC_GPIOHS18 FPIOAFunction = 42 // GPIO High speed 18
- FUNC_GPIOHS19 FPIOAFunction = 43 // GPIO High speed 19
- FUNC_GPIOHS20 FPIOAFunction = 44 // GPIO High speed 20
- FUNC_GPIOHS21 FPIOAFunction = 45 // GPIO High speed 21
- FUNC_GPIOHS22 FPIOAFunction = 46 // GPIO High speed 22
- FUNC_GPIOHS23 FPIOAFunction = 47 // GPIO High speed 23
- FUNC_GPIOHS24 FPIOAFunction = 48 // GPIO High speed 24
- FUNC_GPIOHS25 FPIOAFunction = 49 // GPIO High speed 25
- FUNC_GPIOHS26 FPIOAFunction = 50 // GPIO High speed 26
- FUNC_GPIOHS27 FPIOAFunction = 51 // GPIO High speed 27
- FUNC_GPIOHS28 FPIOAFunction = 52 // GPIO High speed 28
- FUNC_GPIOHS29 FPIOAFunction = 53 // GPIO High speed 29
- FUNC_GPIOHS30 FPIOAFunction = 54 // GPIO High speed 30
- FUNC_GPIOHS31 FPIOAFunction = 55 // GPIO High speed 31
- FUNC_GPIO0 FPIOAFunction = 56 // GPIO pin 0
- FUNC_GPIO1 FPIOAFunction = 57 // GPIO pin 1
- FUNC_GPIO2 FPIOAFunction = 58 // GPIO pin 2
- FUNC_GPIO3 FPIOAFunction = 59 // GPIO pin 3
- FUNC_GPIO4 FPIOAFunction = 60 // GPIO pin 4
- FUNC_GPIO5 FPIOAFunction = 61 // GPIO pin 5
- FUNC_GPIO6 FPIOAFunction = 62 // GPIO pin 6
- FUNC_GPIO7 FPIOAFunction = 63 // GPIO pin 7
- FUNC_UART1_RX FPIOAFunction = 64 // UART1 Receiver
- FUNC_UART1_TX FPIOAFunction = 65 // UART1 Transmitter
- FUNC_UART2_RX FPIOAFunction = 66 // UART2 Receiver
- FUNC_UART2_TX FPIOAFunction = 67 // UART2 Transmitter
- FUNC_UART3_RX FPIOAFunction = 68 // UART3 Receiver
- FUNC_UART3_TX FPIOAFunction = 69 // UART3 Transmitter
- FUNC_SPI1_D0 FPIOAFunction = 70 // SPI1 Data 0
- FUNC_SPI1_D1 FPIOAFunction = 71 // SPI1 Data 1
- FUNC_SPI1_D2 FPIOAFunction = 72 // SPI1 Data 2
- FUNC_SPI1_D3 FPIOAFunction = 73 // SPI1 Data 3
- FUNC_SPI1_D4 FPIOAFunction = 74 // SPI1 Data 4
- FUNC_SPI1_D5 FPIOAFunction = 75 // SPI1 Data 5
- FUNC_SPI1_D6 FPIOAFunction = 76 // SPI1 Data 6
- FUNC_SPI1_D7 FPIOAFunction = 77 // SPI1 Data 7
- FUNC_SPI1_SS0 FPIOAFunction = 78 // SPI1 Chip Select 0
- FUNC_SPI1_SS1 FPIOAFunction = 79 // SPI1 Chip Select 1
- FUNC_SPI1_SS2 FPIOAFunction = 80 // SPI1 Chip Select 2
- FUNC_SPI1_SS3 FPIOAFunction = 81 // SPI1 Chip Select 3
- FUNC_SPI1_ARB FPIOAFunction = 82 // SPI1 Arbitration
- FUNC_SPI1_SCLK FPIOAFunction = 83 // SPI1 Serial Clock
- FUNC_SPI_SLAVE_D0 FPIOAFunction = 84 // SPI Slave Data 0
- FUNC_SPI_SLAVE_SS FPIOAFunction = 85 // SPI Slave Select
- FUNC_SPI_SLAVE_SCLK FPIOAFunction = 86 // SPI Slave Serial Clock
- FUNC_I2S0_MCLK FPIOAFunction = 87 // I2S0 Master Clock
- FUNC_I2S0_SCLK FPIOAFunction = 88 // I2S0 Serial Clock(BCLK)
- FUNC_I2S0_WS FPIOAFunction = 89 // I2S0 Word Select(LRCLK)
- FUNC_I2S0_IN_D0 FPIOAFunction = 90 // I2S0 Serial Data Input 0
- FUNC_I2S0_IN_D1 FPIOAFunction = 91 // I2S0 Serial Data Input 1
- FUNC_I2S0_IN_D2 FPIOAFunction = 92 // I2S0 Serial Data Input 2
- FUNC_I2S0_IN_D3 FPIOAFunction = 93 // I2S0 Serial Data Input 3
- FUNC_I2S0_OUT_D0 FPIOAFunction = 94 // I2S0 Serial Data Output 0
- FUNC_I2S0_OUT_D1 FPIOAFunction = 95 // I2S0 Serial Data Output 1
- FUNC_I2S0_OUT_D2 FPIOAFunction = 96 // I2S0 Serial Data Output 2
- FUNC_I2S0_OUT_D3 FPIOAFunction = 97 // I2S0 Serial Data Output 3
- FUNC_I2S1_MCLK FPIOAFunction = 98 // I2S1 Master Clock
- FUNC_I2S1_SCLK FPIOAFunction = 99 // I2S1 Serial Clock(BCLK)
- FUNC_I2S1_WS FPIOAFunction = 100 // I2S1 Word Select(LRCLK)
- FUNC_I2S1_IN_D0 FPIOAFunction = 101 // I2S1 Serial Data Input 0
- FUNC_I2S1_IN_D1 FPIOAFunction = 102 // I2S1 Serial Data Input 1
- FUNC_I2S1_IN_D2 FPIOAFunction = 103 // I2S1 Serial Data Input 2
- FUNC_I2S1_IN_D3 FPIOAFunction = 104 // I2S1 Serial Data Input 3
- FUNC_I2S1_OUT_D0 FPIOAFunction = 105 // I2S1 Serial Data Output 0
- FUNC_I2S1_OUT_D1 FPIOAFunction = 106 // I2S1 Serial Data Output 1
- FUNC_I2S1_OUT_D2 FPIOAFunction = 107 // I2S1 Serial Data Output 2
- FUNC_I2S1_OUT_D3 FPIOAFunction = 108 // I2S1 Serial Data Output 3
- FUNC_I2S2_MCLK FPIOAFunction = 109 // I2S2 Master Clock
- FUNC_I2S2_SCLK FPIOAFunction = 110 // I2S2 Serial Clock(BCLK)
- FUNC_I2S2_WS FPIOAFunction = 111 // I2S2 Word Select(LRCLK)
- FUNC_I2S2_IN_D0 FPIOAFunction = 112 // I2S2 Serial Data Input 0
- FUNC_I2S2_IN_D1 FPIOAFunction = 113 // I2S2 Serial Data Input 1
- FUNC_I2S2_IN_D2 FPIOAFunction = 114 // I2S2 Serial Data Input 2
- FUNC_I2S2_IN_D3 FPIOAFunction = 115 // I2S2 Serial Data Input 3
- FUNC_I2S2_OUT_D0 FPIOAFunction = 116 // I2S2 Serial Data Output 0
- FUNC_I2S2_OUT_D1 FPIOAFunction = 117 // I2S2 Serial Data Output 1
- FUNC_I2S2_OUT_D2 FPIOAFunction = 118 // I2S2 Serial Data Output 2
- FUNC_I2S2_OUT_D3 FPIOAFunction = 119 // I2S2 Serial Data Output 3
- FUNC_RESV0 FPIOAFunction = 120 // Reserved function
- FUNC_RESV1 FPIOAFunction = 121 // Reserved function
- FUNC_RESV2 FPIOAFunction = 122 // Reserved function
- FUNC_RESV3 FPIOAFunction = 123 // Reserved function
- FUNC_RESV4 FPIOAFunction = 124 // Reserved function
- FUNC_RESV5 FPIOAFunction = 125 // Reserved function
- FUNC_I2C0_SCLK FPIOAFunction = 126 // I2C0 Serial Clock
- FUNC_I2C0_SDA FPIOAFunction = 127 // I2C0 Serial Data
- FUNC_I2C1_SCLK FPIOAFunction = 128 // I2C1 Serial Clock
- FUNC_I2C1_SDA FPIOAFunction = 129 // I2C1 Serial Data
- FUNC_I2C2_SCLK FPIOAFunction = 130 // I2C2 Serial Clock
- FUNC_I2C2_SDA FPIOAFunction = 131 // I2C2 Serial Data
- FUNC_CMOS_XCLK FPIOAFunction = 132 // DVP System Clock
- FUNC_CMOS_RST FPIOAFunction = 133 // DVP System Reset
- FUNC_CMOS_PWDN FPIOAFunction = 134 // DVP Power Down Mode
- FUNC_CMOS_VSYNC FPIOAFunction = 135 // DVP Vertical Sync
- FUNC_CMOS_HREF FPIOAFunction = 136 // DVP Horizontal Reference output
- FUNC_CMOS_PCLK FPIOAFunction = 137 // Pixel Clock
- FUNC_CMOS_D0 FPIOAFunction = 138 // Data Bit 0
- FUNC_CMOS_D1 FPIOAFunction = 139 // Data Bit 1
- FUNC_CMOS_D2 FPIOAFunction = 140 // Data Bit 2
- FUNC_CMOS_D3 FPIOAFunction = 141 // Data Bit 3
- FUNC_CMOS_D4 FPIOAFunction = 142 // Data Bit 4
- FUNC_CMOS_D5 FPIOAFunction = 143 // Data Bit 5
- FUNC_CMOS_D6 FPIOAFunction = 144 // Data Bit 6
- FUNC_CMOS_D7 FPIOAFunction = 145 // Data Bit 7
- FUNC_SCCB_SCLK FPIOAFunction = 146 // SCCB Serial Clock
- FUNC_SCCB_SDA FPIOAFunction = 147 // SCCB Serial Data
- FUNC_UART1_CTS FPIOAFunction = 148 // UART1 Clear To Send
- FUNC_UART1_DSR FPIOAFunction = 149 // UART1 Data Set Ready
- FUNC_UART1_DCD FPIOAFunction = 150 // UART1 Data Carrier Detect
- FUNC_UART1_RI FPIOAFunction = 151 // UART1 Ring Indicator
- FUNC_UART1_SIR_IN FPIOAFunction = 152 // UART1 Serial Infrared Input
- FUNC_UART1_DTR FPIOAFunction = 153 // UART1 Data Terminal Ready
- FUNC_UART1_RTS FPIOAFunction = 154 // UART1 Request To Send
- FUNC_UART1_OUT2 FPIOAFunction = 155 // UART1 User-designated Output 2
- FUNC_UART1_OUT1 FPIOAFunction = 156 // UART1 User-designated Output 1
- FUNC_UART1_SIR_OUT FPIOAFunction = 157 // UART1 Serial Infrared Output
- FUNC_UART1_BAUD FPIOAFunction = 158 // UART1 Transmit Clock Output
- FUNC_UART1_RE FPIOAFunction = 159 // UART1 Receiver Output Enable
- FUNC_UART1_DE FPIOAFunction = 160 // UART1 Driver Output Enable
- FUNC_UART1_RS485_EN FPIOAFunction = 161 // UART1 RS485 Enable
- FUNC_UART2_CTS FPIOAFunction = 162 // UART2 Clear To Send
- FUNC_UART2_DSR FPIOAFunction = 163 // UART2 Data Set Ready
- FUNC_UART2_DCD FPIOAFunction = 164 // UART2 Data Carrier Detect
- FUNC_UART2_RI FPIOAFunction = 165 // UART2 Ring Indicator
- FUNC_UART2_SIR_IN FPIOAFunction = 166 // UART2 Serial Infrared Input
- FUNC_UART2_DTR FPIOAFunction = 167 // UART2 Data Terminal Ready
- FUNC_UART2_RTS FPIOAFunction = 168 // UART2 Request To Send
- FUNC_UART2_OUT2 FPIOAFunction = 169 // UART2 User-designated Output 2
- FUNC_UART2_OUT1 FPIOAFunction = 170 // UART2 User-designated Output 1
- FUNC_UART2_SIR_OUT FPIOAFunction = 171 // UART2 Serial Infrared Output
- FUNC_UART2_BAUD FPIOAFunction = 172 // UART2 Transmit Clock Output
- FUNC_UART2_RE FPIOAFunction = 173 // UART2 Receiver Output Enable
- FUNC_UART2_DE FPIOAFunction = 174 // UART2 Driver Output Enable
- FUNC_UART2_RS485_EN FPIOAFunction = 175 // UART2 RS485 Enable
- FUNC_UART3_CTS FPIOAFunction = 176 // UART3 Clear To Send
- FUNC_UART3_DSR FPIOAFunction = 177 // UART3 Data Set Ready
- FUNC_UART3_DCD FPIOAFunction = 178 // UART3 Data Carrier Detect
- FUNC_UART3_RI FPIOAFunction = 179 // UART3 Ring Indicator
- FUNC_UART3_SIR_IN FPIOAFunction = 180 // UART3 Serial Infrared Input
- FUNC_UART3_DTR FPIOAFunction = 181 // UART3 Data Terminal Ready
- FUNC_UART3_RTS FPIOAFunction = 182 // UART3 Request To Send
- FUNC_UART3_OUT2 FPIOAFunction = 183 // UART3 User-designated Output 2
- FUNC_UART3_OUT1 FPIOAFunction = 184 // UART3 User-designated Output 1
- FUNC_UART3_SIR_OUT FPIOAFunction = 185 // UART3 Serial Infrared Output
- FUNC_UART3_BAUD FPIOAFunction = 186 // UART3 Transmit Clock Output
- FUNC_UART3_RE FPIOAFunction = 187 // UART3 Receiver Output Enable
- FUNC_UART3_DE FPIOAFunction = 188 // UART3 Driver Output Enable
- FUNC_UART3_RS485_EN FPIOAFunction = 189 // UART3 RS485 Enable
- FUNC_TIMER0_TOGGLE1 FPIOAFunction = 190 // TIMER0 Toggle Output 1
- FUNC_TIMER0_TOGGLE2 FPIOAFunction = 191 // TIMER0 Toggle Output 2
- FUNC_TIMER0_TOGGLE3 FPIOAFunction = 192 // TIMER0 Toggle Output 3
- FUNC_TIMER0_TOGGLE4 FPIOAFunction = 193 // TIMER0 Toggle Output 4
- FUNC_TIMER1_TOGGLE1 FPIOAFunction = 194 // TIMER1 Toggle Output 1
- FUNC_TIMER1_TOGGLE2 FPIOAFunction = 195 // TIMER1 Toggle Output 2
- FUNC_TIMER1_TOGGLE3 FPIOAFunction = 196 // TIMER1 Toggle Output 3
- FUNC_TIMER1_TOGGLE4 FPIOAFunction = 197 // TIMER1 Toggle Output 4
- FUNC_TIMER2_TOGGLE1 FPIOAFunction = 198 // TIMER2 Toggle Output 1
- FUNC_TIMER2_TOGGLE2 FPIOAFunction = 199 // TIMER2 Toggle Output 2
- FUNC_TIMER2_TOGGLE3 FPIOAFunction = 200 // TIMER2 Toggle Output 3
- FUNC_TIMER2_TOGGLE4 FPIOAFunction = 201 // TIMER2 Toggle Output 4
- FUNC_CLK_SPI2 FPIOAFunction = 202 // Clock SPI2
- FUNC_CLK_I2C2 FPIOAFunction = 203 // Clock I2C2
- FUNC_INTERNAL0 FPIOAFunction = 204 // Internal function signal 0
- FUNC_INTERNAL1 FPIOAFunction = 205 // Internal function signal 1
- FUNC_INTERNAL2 FPIOAFunction = 206 // Internal function signal 2
- FUNC_INTERNAL3 FPIOAFunction = 207 // Internal function signal 3
- FUNC_INTERNAL4 FPIOAFunction = 208 // Internal function signal 4
- FUNC_INTERNAL5 FPIOAFunction = 209 // Internal function signal 5
- FUNC_INTERNAL6 FPIOAFunction = 210 // Internal function signal 6
- FUNC_INTERNAL7 FPIOAFunction = 211 // Internal function signal 7
- FUNC_INTERNAL8 FPIOAFunction = 212 // Internal function signal 8
- FUNC_INTERNAL9 FPIOAFunction = 213 // Internal function signal 9
- FUNC_INTERNAL10 FPIOAFunction = 214 // Internal function signal 10
- FUNC_INTERNAL11 FPIOAFunction = 215 // Internal function signal 11
- FUNC_INTERNAL12 FPIOAFunction = 216 // Internal function signal 12
- FUNC_INTERNAL13 FPIOAFunction = 217 // Internal function signal 13
- FUNC_INTERNAL14 FPIOAFunction = 218 // Internal function signal 14
- FUNC_INTERNAL15 FPIOAFunction = 219 // Internal function signal 15
- FUNC_INTERNAL16 FPIOAFunction = 220 // Internal function signal 16
- FUNC_INTERNAL17 FPIOAFunction = 221 // Internal function signal 17
- FUNC_CONSTANT FPIOAFunction = 222 // Constant function
- FUNC_INTERNAL18 FPIOAFunction = 223 // Internal function signal 18
- FUNC_DEBUG0 FPIOAFunction = 224 // Debug function 0
- FUNC_DEBUG1 FPIOAFunction = 225 // Debug function 1
- FUNC_DEBUG2 FPIOAFunction = 226 // Debug function 2
- FUNC_DEBUG3 FPIOAFunction = 227 // Debug function 3
- FUNC_DEBUG4 FPIOAFunction = 228 // Debug function 4
- FUNC_DEBUG5 FPIOAFunction = 229 // Debug function 5
- FUNC_DEBUG6 FPIOAFunction = 230 // Debug function 6
- FUNC_DEBUG7 FPIOAFunction = 231 // Debug function 7
- FUNC_DEBUG8 FPIOAFunction = 232 // Debug function 8
- FUNC_DEBUG9 FPIOAFunction = 233 // Debug function 9
- FUNC_DEBUG10 FPIOAFunction = 234 // Debug function 10
- FUNC_DEBUG11 FPIOAFunction = 235 // Debug function 11
- FUNC_DEBUG12 FPIOAFunction = 236 // Debug function 12
- FUNC_DEBUG13 FPIOAFunction = 237 // Debug function 13
- FUNC_DEBUG14 FPIOAFunction = 238 // Debug function 14
- FUNC_DEBUG15 FPIOAFunction = 239 // Debug function 15
- FUNC_DEBUG16 FPIOAFunction = 240 // Debug function 16
- FUNC_DEBUG17 FPIOAFunction = 241 // Debug function 17
- FUNC_DEBUG18 FPIOAFunction = 242 // Debug function 18
- FUNC_DEBUG19 FPIOAFunction = 243 // Debug function 19
- FUNC_DEBUG20 FPIOAFunction = 244 // Debug function 20
- FUNC_DEBUG21 FPIOAFunction = 245 // Debug function 21
- FUNC_DEBUG22 FPIOAFunction = 246 // Debug function 22
- FUNC_DEBUG23 FPIOAFunction = 247 // Debug function 23
- FUNC_DEBUG24 FPIOAFunction = 248 // Debug function 24
- FUNC_DEBUG25 FPIOAFunction = 249 // Debug function 25
- FUNC_DEBUG26 FPIOAFunction = 250 // Debug function 26
- FUNC_DEBUG27 FPIOAFunction = 251 // Debug function 27
- FUNC_DEBUG28 FPIOAFunction = 252 // Debug function 28
- FUNC_DEBUG29 FPIOAFunction = 253 // Debug function 29
- FUNC_DEBUG30 FPIOAFunction = 254 // Debug function 30
- FUNC_DEBUG31 FPIOAFunction = 255 // Debug function 31
+ FUNC_JTAG_TCLK FPIOAFunction = 0 // JTAG Test Clock
+ FUNC_JTAG_TDI FPIOAFunction = 1 // JTAG Test Data In
+ FUNC_JTAG_TMS FPIOAFunction = 2 // JTAG Test Mode Select
+ FUNC_JTAG_TDO FPIOAFunction = 3 // JTAG Test Data Out
+ FUNC_SPI0_D0 FPIOAFunction = 4 // SPI0 Data 0
+ FUNC_SPI0_D1 FPIOAFunction = 5 // SPI0 Data 1
+ FUNC_SPI0_D2 FPIOAFunction = 6 // SPI0 Data 2
+ FUNC_SPI0_D3 FPIOAFunction = 7 // SPI0 Data 3
+ FUNC_SPI0_D4 FPIOAFunction = 8 // SPI0 Data 4
+ FUNC_SPI0_D5 FPIOAFunction = 9 // SPI0 Data 5
+ FUNC_SPI0_D6 FPIOAFunction = 10 // SPI0 Data 6
+ FUNC_SPI0_D7 FPIOAFunction = 11 // SPI0 Data 7
+ FUNC_SPI0_SS0 FPIOAFunction = 12 // SPI0 Chip Select 0
+ FUNC_SPI0_SS1 FPIOAFunction = 13 // SPI0 Chip Select 1
+ FUNC_SPI0_SS2 FPIOAFunction = 14 // SPI0 Chip Select 2
+ FUNC_SPI0_SS3 FPIOAFunction = 15 // SPI0 Chip Select 3
+ FUNC_SPI0_ARB FPIOAFunction = 16 // SPI0 Arbitration
+ FUNC_SPI0_SCLK FPIOAFunction = 17 // SPI0 Serial Clock
+ FUNC_UARTHS_RX FPIOAFunction = 18 // UART High speed Receiver
+ FUNC_UARTHS_TX FPIOAFunction = 19 // UART High speed Transmitter
+ FUNC_RESV6 FPIOAFunction = 20 // Reserved function
+ FUNC_RESV7 FPIOAFunction = 21 // Reserved function
+ FUNC_CLK_SPI1 FPIOAFunction = 22 // Clock SPI1
+ FUNC_CLK_I2C1 FPIOAFunction = 23 // Clock I2C1
+ FUNC_GPIOHS0 FPIOAFunction = 24 // GPIO High speed 0
+ FUNC_GPIOHS1 FPIOAFunction = 25 // GPIO High speed 1
+ FUNC_GPIOHS2 FPIOAFunction = 26 // GPIO High speed 2
+ FUNC_GPIOHS3 FPIOAFunction = 27 // GPIO High speed 3
+ FUNC_GPIOHS4 FPIOAFunction = 28 // GPIO High speed 4
+ FUNC_GPIOHS5 FPIOAFunction = 29 // GPIO High speed 5
+ FUNC_GPIOHS6 FPIOAFunction = 30 // GPIO High speed 6
+ FUNC_GPIOHS7 FPIOAFunction = 31 // GPIO High speed 7
+ FUNC_GPIOHS8 FPIOAFunction = 32 // GPIO High speed 8
+ FUNC_GPIOHS9 FPIOAFunction = 33 // GPIO High speed 9
+ FUNC_GPIOHS10 FPIOAFunction = 34 // GPIO High speed 10
+ FUNC_GPIOHS11 FPIOAFunction = 35 // GPIO High speed 11
+ FUNC_GPIOHS12 FPIOAFunction = 36 // GPIO High speed 12
+ FUNC_GPIOHS13 FPIOAFunction = 37 // GPIO High speed 13
+ FUNC_GPIOHS14 FPIOAFunction = 38 // GPIO High speed 14
+ FUNC_GPIOHS15 FPIOAFunction = 39 // GPIO High speed 15
+ FUNC_GPIOHS16 FPIOAFunction = 40 // GPIO High speed 16
+ FUNC_GPIOHS17 FPIOAFunction = 41 // GPIO High speed 17
+ FUNC_GPIOHS18 FPIOAFunction = 42 // GPIO High speed 18
+ FUNC_GPIOHS19 FPIOAFunction = 43 // GPIO High speed 19
+ FUNC_GPIOHS20 FPIOAFunction = 44 // GPIO High speed 20
+ FUNC_GPIOHS21 FPIOAFunction = 45 // GPIO High speed 21
+ FUNC_GPIOHS22 FPIOAFunction = 46 // GPIO High speed 22
+ FUNC_GPIOHS23 FPIOAFunction = 47 // GPIO High speed 23
+ FUNC_GPIOHS24 FPIOAFunction = 48 // GPIO High speed 24
+ FUNC_GPIOHS25 FPIOAFunction = 49 // GPIO High speed 25
+ FUNC_GPIOHS26 FPIOAFunction = 50 // GPIO High speed 26
+ FUNC_GPIOHS27 FPIOAFunction = 51 // GPIO High speed 27
+ FUNC_GPIOHS28 FPIOAFunction = 52 // GPIO High speed 28
+ FUNC_GPIOHS29 FPIOAFunction = 53 // GPIO High speed 29
+ FUNC_GPIOHS30 FPIOAFunction = 54 // GPIO High speed 30
+ FUNC_GPIOHS31 FPIOAFunction = 55 // GPIO High speed 31
+ FUNC_GPIO0 FPIOAFunction = 56 // GPIO pin 0
+ FUNC_GPIO1 FPIOAFunction = 57 // GPIO pin 1
+ FUNC_GPIO2 FPIOAFunction = 58 // GPIO pin 2
+ FUNC_GPIO3 FPIOAFunction = 59 // GPIO pin 3
+ FUNC_GPIO4 FPIOAFunction = 60 // GPIO pin 4
+ FUNC_GPIO5 FPIOAFunction = 61 // GPIO pin 5
+ FUNC_GPIO6 FPIOAFunction = 62 // GPIO pin 6
+ FUNC_GPIO7 FPIOAFunction = 63 // GPIO pin 7
+ FUNC_UART1_RX FPIOAFunction = 64 // UART1 Receiver
+ FUNC_UART1_TX FPIOAFunction = 65 // UART1 Transmitter
+ FUNC_UART2_RX FPIOAFunction = 66 // UART2 Receiver
+ FUNC_UART2_TX FPIOAFunction = 67 // UART2 Transmitter
+ FUNC_UART3_RX FPIOAFunction = 68 // UART3 Receiver
+ FUNC_UART3_TX FPIOAFunction = 69 // UART3 Transmitter
+ FUNC_SPI1_D0 FPIOAFunction = 70 // SPI1 Data 0
+ FUNC_SPI1_D1 FPIOAFunction = 71 // SPI1 Data 1
+ FUNC_SPI1_D2 FPIOAFunction = 72 // SPI1 Data 2
+ FUNC_SPI1_D3 FPIOAFunction = 73 // SPI1 Data 3
+ FUNC_SPI1_D4 FPIOAFunction = 74 // SPI1 Data 4
+ FUNC_SPI1_D5 FPIOAFunction = 75 // SPI1 Data 5
+ FUNC_SPI1_D6 FPIOAFunction = 76 // SPI1 Data 6
+ FUNC_SPI1_D7 FPIOAFunction = 77 // SPI1 Data 7
+ FUNC_SPI1_SS0 FPIOAFunction = 78 // SPI1 Chip Select 0
+ FUNC_SPI1_SS1 FPIOAFunction = 79 // SPI1 Chip Select 1
+ FUNC_SPI1_SS2 FPIOAFunction = 80 // SPI1 Chip Select 2
+ FUNC_SPI1_SS3 FPIOAFunction = 81 // SPI1 Chip Select 3
+ FUNC_SPI1_ARB FPIOAFunction = 82 // SPI1 Arbitration
+ FUNC_SPI1_SCLK FPIOAFunction = 83 // SPI1 Serial Clock
+ FUNC_SPI_PERIPHERAL_D0 FPIOAFunction = 84 // SPI Peripheral Data 0
+ FUNC_SPI_PERIPHERAL_SS FPIOAFunction = 85 // SPI Peripheral Select
+ FUNC_SPI_PERIPHERAL_SCLK FPIOAFunction = 86 // SPI Peripheral Serial Clock
+ FUNC_I2S0_MCLK FPIOAFunction = 87 // I2S0 Main Clock
+ FUNC_I2S0_SCLK FPIOAFunction = 88 // I2S0 Serial Clock(BCLK)
+ FUNC_I2S0_WS FPIOAFunction = 89 // I2S0 Word Select(LRCLK)
+ FUNC_I2S0_IN_D0 FPIOAFunction = 90 // I2S0 Serial Data Input 0
+ FUNC_I2S0_IN_D1 FPIOAFunction = 91 // I2S0 Serial Data Input 1
+ FUNC_I2S0_IN_D2 FPIOAFunction = 92 // I2S0 Serial Data Input 2
+ FUNC_I2S0_IN_D3 FPIOAFunction = 93 // I2S0 Serial Data Input 3
+ FUNC_I2S0_OUT_D0 FPIOAFunction = 94 // I2S0 Serial Data Output 0
+ FUNC_I2S0_OUT_D1 FPIOAFunction = 95 // I2S0 Serial Data Output 1
+ FUNC_I2S0_OUT_D2 FPIOAFunction = 96 // I2S0 Serial Data Output 2
+ FUNC_I2S0_OUT_D3 FPIOAFunction = 97 // I2S0 Serial Data Output 3
+ FUNC_I2S1_MCLK FPIOAFunction = 98 // I2S1 Main Clock
+ FUNC_I2S1_SCLK FPIOAFunction = 99 // I2S1 Serial Clock(BCLK)
+ FUNC_I2S1_WS FPIOAFunction = 100 // I2S1 Word Select(LRCLK)
+ FUNC_I2S1_IN_D0 FPIOAFunction = 101 // I2S1 Serial Data Input 0
+ FUNC_I2S1_IN_D1 FPIOAFunction = 102 // I2S1 Serial Data Input 1
+ FUNC_I2S1_IN_D2 FPIOAFunction = 103 // I2S1 Serial Data Input 2
+ FUNC_I2S1_IN_D3 FPIOAFunction = 104 // I2S1 Serial Data Input 3
+ FUNC_I2S1_OUT_D0 FPIOAFunction = 105 // I2S1 Serial Data Output 0
+ FUNC_I2S1_OUT_D1 FPIOAFunction = 106 // I2S1 Serial Data Output 1
+ FUNC_I2S1_OUT_D2 FPIOAFunction = 107 // I2S1 Serial Data Output 2
+ FUNC_I2S1_OUT_D3 FPIOAFunction = 108 // I2S1 Serial Data Output 3
+ FUNC_I2S2_MCLK FPIOAFunction = 109 // I2S2 Main Clock
+ FUNC_I2S2_SCLK FPIOAFunction = 110 // I2S2 Serial Clock(BCLK)
+ FUNC_I2S2_WS FPIOAFunction = 111 // I2S2 Word Select(LRCLK)
+ FUNC_I2S2_IN_D0 FPIOAFunction = 112 // I2S2 Serial Data Input 0
+ FUNC_I2S2_IN_D1 FPIOAFunction = 113 // I2S2 Serial Data Input 1
+ FUNC_I2S2_IN_D2 FPIOAFunction = 114 // I2S2 Serial Data Input 2
+ FUNC_I2S2_IN_D3 FPIOAFunction = 115 // I2S2 Serial Data Input 3
+ FUNC_I2S2_OUT_D0 FPIOAFunction = 116 // I2S2 Serial Data Output 0
+ FUNC_I2S2_OUT_D1 FPIOAFunction = 117 // I2S2 Serial Data Output 1
+ FUNC_I2S2_OUT_D2 FPIOAFunction = 118 // I2S2 Serial Data Output 2
+ FUNC_I2S2_OUT_D3 FPIOAFunction = 119 // I2S2 Serial Data Output 3
+ FUNC_RESV0 FPIOAFunction = 120 // Reserved function
+ FUNC_RESV1 FPIOAFunction = 121 // Reserved function
+ FUNC_RESV2 FPIOAFunction = 122 // Reserved function
+ FUNC_RESV3 FPIOAFunction = 123 // Reserved function
+ FUNC_RESV4 FPIOAFunction = 124 // Reserved function
+ FUNC_RESV5 FPIOAFunction = 125 // Reserved function
+ FUNC_I2C0_SCLK FPIOAFunction = 126 // I2C0 Serial Clock
+ FUNC_I2C0_SDA FPIOAFunction = 127 // I2C0 Serial Data
+ FUNC_I2C1_SCLK FPIOAFunction = 128 // I2C1 Serial Clock
+ FUNC_I2C1_SDA FPIOAFunction = 129 // I2C1 Serial Data
+ FUNC_I2C2_SCLK FPIOAFunction = 130 // I2C2 Serial Clock
+ FUNC_I2C2_SDA FPIOAFunction = 131 // I2C2 Serial Data
+ FUNC_CMOS_XCLK FPIOAFunction = 132 // DVP System Clock
+ FUNC_CMOS_RST FPIOAFunction = 133 // DVP System Reset
+ FUNC_CMOS_PWDN FPIOAFunction = 134 // DVP Power Down Mode
+ FUNC_CMOS_VSYNC FPIOAFunction = 135 // DVP Vertical Sync
+ FUNC_CMOS_HREF FPIOAFunction = 136 // DVP Horizontal Reference output
+ FUNC_CMOS_PCLK FPIOAFunction = 137 // Pixel Clock
+ FUNC_CMOS_D0 FPIOAFunction = 138 // Data Bit 0
+ FUNC_CMOS_D1 FPIOAFunction = 139 // Data Bit 1
+ FUNC_CMOS_D2 FPIOAFunction = 140 // Data Bit 2
+ FUNC_CMOS_D3 FPIOAFunction = 141 // Data Bit 3
+ FUNC_CMOS_D4 FPIOAFunction = 142 // Data Bit 4
+ FUNC_CMOS_D5 FPIOAFunction = 143 // Data Bit 5
+ FUNC_CMOS_D6 FPIOAFunction = 144 // Data Bit 6
+ FUNC_CMOS_D7 FPIOAFunction = 145 // Data Bit 7
+ FUNC_SCCB_SCLK FPIOAFunction = 146 // SCCB Serial Clock
+ FUNC_SCCB_SDA FPIOAFunction = 147 // SCCB Serial Data
+ FUNC_UART1_CTS FPIOAFunction = 148 // UART1 Clear To Send
+ FUNC_UART1_DSR FPIOAFunction = 149 // UART1 Data Set Ready
+ FUNC_UART1_DCD FPIOAFunction = 150 // UART1 Data Carrier Detect
+ FUNC_UART1_RI FPIOAFunction = 151 // UART1 Ring Indicator
+ FUNC_UART1_SIR_IN FPIOAFunction = 152 // UART1 Serial Infrared Input
+ FUNC_UART1_DTR FPIOAFunction = 153 // UART1 Data Terminal Ready
+ FUNC_UART1_RTS FPIOAFunction = 154 // UART1 Request To Send
+ FUNC_UART1_OUT2 FPIOAFunction = 155 // UART1 User-designated Output 2
+ FUNC_UART1_OUT1 FPIOAFunction = 156 // UART1 User-designated Output 1
+ FUNC_UART1_SIR_OUT FPIOAFunction = 157 // UART1 Serial Infrared Output
+ FUNC_UART1_BAUD FPIOAFunction = 158 // UART1 Transmit Clock Output
+ FUNC_UART1_RE FPIOAFunction = 159 // UART1 Receiver Output Enable
+ FUNC_UART1_DE FPIOAFunction = 160 // UART1 Driver Output Enable
+ FUNC_UART1_RS485_EN FPIOAFunction = 161 // UART1 RS485 Enable
+ FUNC_UART2_CTS FPIOAFunction = 162 // UART2 Clear To Send
+ FUNC_UART2_DSR FPIOAFunction = 163 // UART2 Data Set Ready
+ FUNC_UART2_DCD FPIOAFunction = 164 // UART2 Data Carrier Detect
+ FUNC_UART2_RI FPIOAFunction = 165 // UART2 Ring Indicator
+ FUNC_UART2_SIR_IN FPIOAFunction = 166 // UART2 Serial Infrared Input
+ FUNC_UART2_DTR FPIOAFunction = 167 // UART2 Data Terminal Ready
+ FUNC_UART2_RTS FPIOAFunction = 168 // UART2 Request To Send
+ FUNC_UART2_OUT2 FPIOAFunction = 169 // UART2 User-designated Output 2
+ FUNC_UART2_OUT1 FPIOAFunction = 170 // UART2 User-designated Output 1
+ FUNC_UART2_SIR_OUT FPIOAFunction = 171 // UART2 Serial Infrared Output
+ FUNC_UART2_BAUD FPIOAFunction = 172 // UART2 Transmit Clock Output
+ FUNC_UART2_RE FPIOAFunction = 173 // UART2 Receiver Output Enable
+ FUNC_UART2_DE FPIOAFunction = 174 // UART2 Driver Output Enable
+ FUNC_UART2_RS485_EN FPIOAFunction = 175 // UART2 RS485 Enable
+ FUNC_UART3_CTS FPIOAFunction = 176 // UART3 Clear To Send
+ FUNC_UART3_DSR FPIOAFunction = 177 // UART3 Data Set Ready
+ FUNC_UART3_DCD FPIOAFunction = 178 // UART3 Data Carrier Detect
+ FUNC_UART3_RI FPIOAFunction = 179 // UART3 Ring Indicator
+ FUNC_UART3_SIR_IN FPIOAFunction = 180 // UART3 Serial Infrared Input
+ FUNC_UART3_DTR FPIOAFunction = 181 // UART3 Data Terminal Ready
+ FUNC_UART3_RTS FPIOAFunction = 182 // UART3 Request To Send
+ FUNC_UART3_OUT2 FPIOAFunction = 183 // UART3 User-designated Output 2
+ FUNC_UART3_OUT1 FPIOAFunction = 184 // UART3 User-designated Output 1
+ FUNC_UART3_SIR_OUT FPIOAFunction = 185 // UART3 Serial Infrared Output
+ FUNC_UART3_BAUD FPIOAFunction = 186 // UART3 Transmit Clock Output
+ FUNC_UART3_RE FPIOAFunction = 187 // UART3 Receiver Output Enable
+ FUNC_UART3_DE FPIOAFunction = 188 // UART3 Driver Output Enable
+ FUNC_UART3_RS485_EN FPIOAFunction = 189 // UART3 RS485 Enable
+ FUNC_TIMER0_TOGGLE1 FPIOAFunction = 190 // TIMER0 Toggle Output 1
+ FUNC_TIMER0_TOGGLE2 FPIOAFunction = 191 // TIMER0 Toggle Output 2
+ FUNC_TIMER0_TOGGLE3 FPIOAFunction = 192 // TIMER0 Toggle Output 3
+ FUNC_TIMER0_TOGGLE4 FPIOAFunction = 193 // TIMER0 Toggle Output 4
+ FUNC_TIMER1_TOGGLE1 FPIOAFunction = 194 // TIMER1 Toggle Output 1
+ FUNC_TIMER1_TOGGLE2 FPIOAFunction = 195 // TIMER1 Toggle Output 2
+ FUNC_TIMER1_TOGGLE3 FPIOAFunction = 196 // TIMER1 Toggle Output 3
+ FUNC_TIMER1_TOGGLE4 FPIOAFunction = 197 // TIMER1 Toggle Output 4
+ FUNC_TIMER2_TOGGLE1 FPIOAFunction = 198 // TIMER2 Toggle Output 1
+ FUNC_TIMER2_TOGGLE2 FPIOAFunction = 199 // TIMER2 Toggle Output 2
+ FUNC_TIMER2_TOGGLE3 FPIOAFunction = 200 // TIMER2 Toggle Output 3
+ FUNC_TIMER2_TOGGLE4 FPIOAFunction = 201 // TIMER2 Toggle Output 4
+ FUNC_CLK_SPI2 FPIOAFunction = 202 // Clock SPI2
+ FUNC_CLK_I2C2 FPIOAFunction = 203 // Clock I2C2
+ FUNC_INTERNAL0 FPIOAFunction = 204 // Internal function signal 0
+ FUNC_INTERNAL1 FPIOAFunction = 205 // Internal function signal 1
+ FUNC_INTERNAL2 FPIOAFunction = 206 // Internal function signal 2
+ FUNC_INTERNAL3 FPIOAFunction = 207 // Internal function signal 3
+ FUNC_INTERNAL4 FPIOAFunction = 208 // Internal function signal 4
+ FUNC_INTERNAL5 FPIOAFunction = 209 // Internal function signal 5
+ FUNC_INTERNAL6 FPIOAFunction = 210 // Internal function signal 6
+ FUNC_INTERNAL7 FPIOAFunction = 211 // Internal function signal 7
+ FUNC_INTERNAL8 FPIOAFunction = 212 // Internal function signal 8
+ FUNC_INTERNAL9 FPIOAFunction = 213 // Internal function signal 9
+ FUNC_INTERNAL10 FPIOAFunction = 214 // Internal function signal 10
+ FUNC_INTERNAL11 FPIOAFunction = 215 // Internal function signal 11
+ FUNC_INTERNAL12 FPIOAFunction = 216 // Internal function signal 12
+ FUNC_INTERNAL13 FPIOAFunction = 217 // Internal function signal 13
+ FUNC_INTERNAL14 FPIOAFunction = 218 // Internal function signal 14
+ FUNC_INTERNAL15 FPIOAFunction = 219 // Internal function signal 15
+ FUNC_INTERNAL16 FPIOAFunction = 220 // Internal function signal 16
+ FUNC_INTERNAL17 FPIOAFunction = 221 // Internal function signal 17
+ FUNC_CONSTANT FPIOAFunction = 222 // Constant function
+ FUNC_INTERNAL18 FPIOAFunction = 223 // Internal function signal 18
+ FUNC_DEBUG0 FPIOAFunction = 224 // Debug function 0
+ FUNC_DEBUG1 FPIOAFunction = 225 // Debug function 1
+ FUNC_DEBUG2 FPIOAFunction = 226 // Debug function 2
+ FUNC_DEBUG3 FPIOAFunction = 227 // Debug function 3
+ FUNC_DEBUG4 FPIOAFunction = 228 // Debug function 4
+ FUNC_DEBUG5 FPIOAFunction = 229 // Debug function 5
+ FUNC_DEBUG6 FPIOAFunction = 230 // Debug function 6
+ FUNC_DEBUG7 FPIOAFunction = 231 // Debug function 7
+ FUNC_DEBUG8 FPIOAFunction = 232 // Debug function 8
+ FUNC_DEBUG9 FPIOAFunction = 233 // Debug function 9
+ FUNC_DEBUG10 FPIOAFunction = 234 // Debug function 10
+ FUNC_DEBUG11 FPIOAFunction = 235 // Debug function 11
+ FUNC_DEBUG12 FPIOAFunction = 236 // Debug function 12
+ FUNC_DEBUG13 FPIOAFunction = 237 // Debug function 13
+ FUNC_DEBUG14 FPIOAFunction = 238 // Debug function 14
+ FUNC_DEBUG15 FPIOAFunction = 239 // Debug function 15
+ FUNC_DEBUG16 FPIOAFunction = 240 // Debug function 16
+ FUNC_DEBUG17 FPIOAFunction = 241 // Debug function 17
+ FUNC_DEBUG18 FPIOAFunction = 242 // Debug function 18
+ FUNC_DEBUG19 FPIOAFunction = 243 // Debug function 19
+ FUNC_DEBUG20 FPIOAFunction = 244 // Debug function 20
+ FUNC_DEBUG21 FPIOAFunction = 245 // Debug function 21
+ FUNC_DEBUG22 FPIOAFunction = 246 // Debug function 22
+ FUNC_DEBUG23 FPIOAFunction = 247 // Debug function 23
+ FUNC_DEBUG24 FPIOAFunction = 248 // Debug function 24
+ FUNC_DEBUG25 FPIOAFunction = 249 // Debug function 25
+ FUNC_DEBUG26 FPIOAFunction = 250 // Debug function 26
+ FUNC_DEBUG27 FPIOAFunction = 251 // Debug function 27
+ FUNC_DEBUG28 FPIOAFunction = 252 // Debug function 28
+ FUNC_DEBUG29 FPIOAFunction = 253 // Debug function 29
+ FUNC_DEBUG30 FPIOAFunction = 254 // Debug function 30
+ FUNC_DEBUG31 FPIOAFunction = 255 // Debug function 31
)
// These are the default FPIOA values for each function.
diff --git a/src/machine/board_maixbit.go b/src/machine/board_maixbit.go
index c1d002f36..718a46e4e 100644
--- a/src/machine/board_maixbit.go
+++ b/src/machine/board_maixbit.go
@@ -30,9 +30,9 @@ const (
D23 = P23 // GPIOHS7
D24 = P24 // GPIOHS8
D25 = P25 // GPIOHS9
- D26 = P26 // GPIOHS10 / SPI0_MISO
+ D26 = P26 // GPIOHS10 / SPI0_SDI
D27 = P27 // GPIOHS11 / SPI0_SCLK
- D28 = P28 // GPIOHS12 / SPI0_MOSI
+ D28 = P28 // GPIOHS12 / SPI0_SDO
D29 = P29 // GPIOHS13
D30 = P30 // GPIOHS14
D31 = P31 // GPIOHS15
@@ -60,9 +60,9 @@ const (
// SPI pins.
const (
- SPI0_SCK_PIN = D27
- SPI0_MOSI_PIN = D28
- SPI0_MISO_PIN = D26
+ SPI0_SCK_PIN = D27
+ SPI0_SDO_PIN = D28
+ SPI0_SDI_PIN = D26
)
// I2C pins.
diff --git a/src/machine/board_metro-m4-airlift.go b/src/machine/board_metro-m4-airlift.go
index c1f49a190..5d12dd73a 100644
--- a/src/machine/board_metro-m4-airlift.go
+++ b/src/machine/board_metro-m4-airlift.go
@@ -75,19 +75,19 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = PA13 // SCK: SERCOM2/PAD[1]
- SPI0_MOSI_PIN = PA12 // MOSI: SERCOM2/PAD[0]
- SPI0_MISO_PIN = PA14 // MISO: SERCOM2/PAD[2]
+ SPI0_SCK_PIN = PA13 // SCK: SERCOM2/PAD[1]
+ SPI0_SDO_PIN = PA12 // SDO: SERCOM2/PAD[0]
+ SPI0_SDI_PIN = PA14 // SDI: SERCOM2/PAD[2]
- NINA_MOSI = SPI0_MOSI_PIN
- NINA_MISO = SPI0_MISO_PIN
- NINA_SCK = SPI0_SCK_PIN
+ NINA_SDO = SPI0_SDO_PIN
+ NINA_SDI = SPI0_SDI_PIN
+ NINA_SCK = SPI0_SCK_PIN
)
const (
- SPI1_SCK_PIN = D12 // MISO: SERCOM1/PAD[1]
- SPI1_MOSI_PIN = D11 // MOSI: SERCOM1/PAD[3]
- SPI1_MISO_PIN = D13 // SCK: SERCOM1/PAD[0]
+ SPI1_SCK_PIN = D12 // SDI: SERCOM1/PAD[1]
+ SPI1_SDO_PIN = D11 // SDO: SERCOM1/PAD[3]
+ SPI1_SDI_PIN = D13 // SCK: SERCOM1/PAD[0]
)
// USB CDC identifiers
diff --git a/src/machine/board_microbit.go b/src/machine/board_microbit.go
index 888c7c963..a606ad869 100644
--- a/src/machine/board_microbit.go
+++ b/src/machine/board_microbit.go
@@ -33,9 +33,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 23 // P13 on the board
- SPI0_MOSI_PIN Pin = 21 // P15 on the board
- SPI0_MISO_PIN Pin = 22 // P14 on the board
+ SPI0_SCK_PIN Pin = 23 // P13 on the board
+ SPI0_SDO_PIN Pin = 21 // P15 on the board
+ SPI0_SDI_PIN Pin = 22 // P14 on the board
)
// GPIO/Analog pins
diff --git a/src/machine/board_nrf52840-mdk.go b/src/machine/board_nrf52840-mdk.go
index ab5749634..78847d465 100644
--- a/src/machine/board_nrf52840-mdk.go
+++ b/src/machine/board_nrf52840-mdk.go
@@ -31,9 +31,9 @@ const (
// SPI pins (unused)
const (
- SPI0_SCK_PIN = NoPin
- SPI0_MOSI_PIN = NoPin
- SPI0_MISO_PIN = NoPin
+ SPI0_SCK_PIN = NoPin
+ SPI0_SDO_PIN = NoPin
+ SPI0_SDI_PIN = NoPin
)
// USB CDC identifiers
diff --git a/src/machine/board_nucleof103rb.go b/src/machine/board_nucleof103rb.go
index 5e2850f7b..f3be4d7f7 100644
--- a/src/machine/board_nucleof103rb.go
+++ b/src/machine/board_nucleof103rb.go
@@ -113,9 +113,9 @@ func init() {
// SPI pins
const (
- SPI0_SCK_PIN = PA5
- SPI0_MISO_PIN = PA6
- SPI0_MOSI_PIN = PA7
+ SPI0_SCK_PIN = PA5
+ SPI0_SDI_PIN = PA6
+ SPI0_SDO_PIN = PA7
)
// I2C pins
diff --git a/src/machine/board_particle_argon.go b/src/machine/board_particle_argon.go
index 2ffb9a1bd..5401c4ad9 100644
--- a/src/machine/board_particle_argon.go
+++ b/src/machine/board_particle_argon.go
@@ -34,8 +34,8 @@ const (
D8 Pin = 35
D9 Pin = 6 // Also TX
D10 Pin = 8 // Also RX
- D11 Pin = 46 // Also MISO
- D12 Pin = 45 // Also MOSI
+ D11 Pin = 46 // Also SDI
+ D12 Pin = 45 // Also SDO
D13 Pin = 47 // Also SCK
)
@@ -58,16 +58,16 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 47
- SPI0_MOSI_PIN Pin = 45
- SPI0_MISO_PIN Pin = 46
+ SPI0_SCK_PIN Pin = 47
+ SPI0_SDO_PIN Pin = 45
+ SPI0_SDI_PIN Pin = 46
)
// Internal 4MB SPI Flash
const (
SPI1_SCK_PIN Pin = 19
- SPI1_MOSI_PIN Pin = 20
- SPI1_MISO_PIN Pin = 21
+ SPI1_SDO_PIN Pin = 20
+ SPI1_SDI_PIN Pin = 21
SPI1_CS_PIN Pin = 17
SPI1_WP_PIN Pin = 22
SPI1_HOLD_PIN Pin = 23
diff --git a/src/machine/board_particle_boron.go b/src/machine/board_particle_boron.go
index eae10ccf5..cb05e7253 100644
--- a/src/machine/board_particle_boron.go
+++ b/src/machine/board_particle_boron.go
@@ -34,8 +34,8 @@ const (
D8 Pin = 35
D9 Pin = 6 // Also TX
D10 Pin = 8 // Also RX
- D11 Pin = 46 // Also MISO
- D12 Pin = 45 // Also MOSI
+ D11 Pin = 46 // Also SDI
+ D12 Pin = 45 // Also SDO
D13 Pin = 47 // Also SCK
)
@@ -63,16 +63,16 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 47
- SPI0_MOSI_PIN Pin = 45
- SPI0_MISO_PIN Pin = 46
+ SPI0_SCK_PIN Pin = 47
+ SPI0_SDO_PIN Pin = 45
+ SPI0_SDI_PIN Pin = 46
)
// Internal 4MB SPI Flash
const (
SPI1_SCK_PIN Pin = 19
- SPI1_MOSI_PIN Pin = 20
- SPI1_MISO_PIN Pin = 21
+ SPI1_SDO_PIN Pin = 20
+ SPI1_SDI_PIN Pin = 21
SPI1_CS_PIN Pin = 17
SPI1_WP_PIN Pin = 22
SPI1_HOLD_PIN Pin = 23
diff --git a/src/machine/board_particle_xenon.go b/src/machine/board_particle_xenon.go
index 6ba72bf1e..c16146364 100644
--- a/src/machine/board_particle_xenon.go
+++ b/src/machine/board_particle_xenon.go
@@ -34,8 +34,8 @@ const (
D8 Pin = 35
D9 Pin = 6 // Also TX
D10 Pin = 8 // Also RX
- D11 Pin = 46 // Also MISO
- D12 Pin = 45 // Also MOSI
+ D11 Pin = 46 // Also SDI
+ D12 Pin = 45 // Also SDO
D13 Pin = 47 // Also SCK
)
@@ -58,16 +58,16 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 47
- SPI0_MOSI_PIN Pin = 45
- SPI0_MISO_PIN Pin = 46
+ SPI0_SCK_PIN Pin = 47
+ SPI0_SDO_PIN Pin = 45
+ SPI0_SDI_PIN Pin = 46
)
// Internal 4MB SPI Flash
const (
SPI1_SCK_PIN Pin = 19
- SPI1_MOSI_PIN Pin = 20
- SPI1_MISO_PIN Pin = 21
+ SPI1_SDO_PIN Pin = 20
+ SPI1_SDI_PIN Pin = 21
SPI1_CS_PIN Pin = 17
SPI1_WP_PIN Pin = 22
SPI1_HOLD_PIN Pin = 23
diff --git a/src/machine/board_pca10031.go b/src/machine/board_pca10031.go
index b2b37c69c..a4798814e 100644
--- a/src/machine/board_pca10031.go
+++ b/src/machine/board_pca10031.go
@@ -33,7 +33,7 @@ const (
// SPI pins (unused)
const (
- SPI0_SCK_PIN = NoPin
- SPI0_MOSI_PIN = NoPin
- SPI0_MISO_PIN = NoPin
+ SPI0_SCK_PIN = NoPin
+ SPI0_SDO_PIN = NoPin
+ SPI0_SDI_PIN = NoPin
)
diff --git a/src/machine/board_pca10040.go b/src/machine/board_pca10040.go
index f00e357b6..8d73e6559 100644
--- a/src/machine/board_pca10040.go
+++ b/src/machine/board_pca10040.go
@@ -47,7 +47,7 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 25
- SPI0_MOSI_PIN Pin = 23
- SPI0_MISO_PIN Pin = 24
+ SPI0_SCK_PIN Pin = 25
+ SPI0_SDO_PIN Pin = 23
+ SPI0_SDI_PIN Pin = 24
)
diff --git a/src/machine/board_pca10056.go b/src/machine/board_pca10056.go
index 58e3d3e36..5a9bcd5f9 100644
--- a/src/machine/board_pca10056.go
+++ b/src/machine/board_pca10056.go
@@ -46,9 +46,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 47 // P1.15
- SPI0_MOSI_PIN Pin = 45 // P1.13
- SPI0_MISO_PIN Pin = 46 // P1.14
+ SPI0_SCK_PIN Pin = 47 // P1.15
+ SPI0_SDO_PIN Pin = 45 // P1.13
+ SPI0_SDI_PIN Pin = 46 // P1.14
)
// USB CDC identifiers
diff --git a/src/machine/board_pinetime-devkit0.go b/src/machine/board_pinetime-devkit0.go
index 6fce9dcbf..3526769c0 100644
--- a/src/machine/board_pinetime-devkit0.go
+++ b/src/machine/board_pinetime-devkit0.go
@@ -27,9 +27,9 @@ const (
// SPI pins for the PineTime.
const (
- SPI0_SCK_PIN Pin = 2
- SPI0_MOSI_PIN Pin = 3
- SPI0_MISO_PIN Pin = 4
+ SPI0_SCK_PIN Pin = 2
+ SPI0_SDO_PIN Pin = 3
+ SPI0_SDI_PIN Pin = 4
)
// I2C pins for the PineTime.
@@ -51,7 +51,7 @@ const VIBRATOR_PIN Pin = 16
// http://files.pine64.org/doc/PineTime/PineTime%20Port%20Assignment%20rev1.0.pdf
const (
LCD_SCK = SPI0_SCK_PIN
- LCD_SDI = SPI0_MOSI_PIN
+ LCD_SDI = SPI0_SDO_PIN
LCD_RS Pin = 18
LCD_CS Pin = 25
LCD_RESET Pin = 26
diff --git a/src/machine/board_pybadge.go b/src/machine/board_pybadge.go
index 2b830197a..35e446b31 100644
--- a/src/machine/board_pybadge.go
+++ b/src/machine/board_pybadge.go
@@ -91,16 +91,16 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN = PB23 // MOSI: SERCOM1/PAD[3]
- SPI0_MISO_PIN = PB22 // MISO: SERCOM1/PAD[2]
+ SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN = PB23 // SDO: SERCOM1/PAD[3]
+ SPI0_SDI_PIN = PB22 // SDI: SERCOM1/PAD[2]
)
// TFT SPI pins
const (
- SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1]
- SPI1_MOSI_PIN = PB15 // MOSI: SERCOM4/PAD[3]
- SPI1_MISO_PIN = NoPin
+ SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1]
+ SPI1_SDO_PIN = PB15 // SDO: SERCOM4/PAD[3]
+ SPI1_SDI_PIN = NoPin
)
// USB CDC identifiers
diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go
index 6719f0d06..5743ec95d 100644
--- a/src/machine/board_pygamer.go
+++ b/src/machine/board_pygamer.go
@@ -107,9 +107,9 @@ var (
// SPI pins
const (
- SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN = PB23 // MOSI: SERCOM1/PAD[3]
- SPI0_MISO_PIN = PB22 // MISO: SERCOM1/PAD[2]
+ SPI0_SCK_PIN = PA17 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN = PB23 // SDO: SERCOM1/PAD[3]
+ SPI0_SDI_PIN = PB22 // SDI: SERCOM1/PAD[2]
)
// SPI on the PyGamer.
@@ -122,9 +122,9 @@ var (
// TFT SPI pins
const (
- SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1]
- SPI1_MOSI_PIN = PB15 // MOSI: SERCOM4/PAD[3]
- SPI1_MISO_PIN = NoPin
+ SPI1_SCK_PIN = PB13 // SCK: SERCOM4/PAD[1]
+ SPI1_SDO_PIN = PB15 // SDO: SERCOM4/PAD[3]
+ SPI1_SDI_PIN = NoPin
)
// TFT SPI on the PyGamer.
diff --git a/src/machine/board_pyportal.go b/src/machine/board_pyportal.go
index 2eaf0b880..ff3ad1a1a 100644
--- a/src/machine/board_pyportal.go
+++ b/src/machine/board_pyportal.go
@@ -26,9 +26,9 @@ const (
D26 = PB09 // TFT_WR
D27 = PB02 // SDA
D28 = PB03 // SCL
- D29 = PA12 // MOSI
+ D29 = PA12 // SDO
D30 = PA13 // SCK
- D31 = PA14 // MISO
+ D31 = PA14 // SDI
D32 = PB30 // SD_CS
D33 = PA01 // SD_CARD_DETECT
D34 = PA16 // LCD_DATA0
@@ -114,13 +114,13 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = PA13 // SCK: SERCOM1/PAD[1]
- SPI0_MOSI_PIN = PA12 // MOSI: SERCOM1/PAD[3]
- SPI0_MISO_PIN = PA14 // MISO: SERCOM1/PAD[2]
+ SPI0_SCK_PIN = PA13 // SCK: SERCOM1/PAD[1]
+ SPI0_SDO_PIN = PA12 // SDO: SERCOM1/PAD[3]
+ SPI0_SDI_PIN = PA14 // SDI: SERCOM1/PAD[2]
- NINA_MOSI = SPI0_MOSI_PIN
- NINA_MISO = SPI0_MISO_PIN
- NINA_SCK = SPI0_SCK_PIN
+ NINA_SDO = SPI0_SDO_PIN
+ NINA_SDI = SPI0_SDI_PIN
+ NINA_SCK = SPI0_SCK_PIN
)
// USB CDC identifiers
diff --git a/src/machine/board_reelboard.go b/src/machine/board_reelboard.go
index 789c4283b..400ad4212 100644
--- a/src/machine/board_reelboard.go
+++ b/src/machine/board_reelboard.go
@@ -20,7 +20,7 @@ const (
EPD_DC_PIN Pin = 16
EPD_CS_PIN Pin = 17
EPD_SCK_PIN Pin = 19
- EPD_MOSI_PIN Pin = 20
+ EPD_SDO_PIN Pin = 20
POWER_SUPPLY_PIN Pin = 32
)
@@ -43,9 +43,9 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN Pin = 47
- SPI0_MOSI_PIN Pin = 45
- SPI0_MISO_PIN Pin = 46
+ SPI0_SCK_PIN Pin = 47
+ SPI0_SDO_PIN Pin = 45
+ SPI0_SDI_PIN Pin = 46
)
// PowerSupplyActive enables the supply voltages for nRF52840 and peripherals (true) or only for nRF52840 (false)
diff --git a/src/machine/board_stm32f4disco.go b/src/machine/board_stm32f4disco.go
index e5dc4a927..5367b66c4 100644
--- a/src/machine/board_stm32f4disco.go
+++ b/src/machine/board_stm32f4disco.go
@@ -132,12 +132,12 @@ func init() {
// SPI pins
const (
- SPI1_SCK_PIN = PA5
- SPI1_MISO_PIN = PA6
- SPI1_MOSI_PIN = PA7
- SPI0_SCK_PIN = SPI1_SCK_PIN
- SPI0_MISO_PIN = SPI1_MISO_PIN
- SPI0_MOSI_PIN = SPI1_MOSI_PIN
+ SPI1_SCK_PIN = PA5
+ SPI1_SDI_PIN = PA6
+ SPI1_SDO_PIN = PA7
+ SPI0_SCK_PIN = SPI1_SCK_PIN
+ SPI0_SDI_PIN = SPI1_SDI_PIN
+ SPI0_SDO_PIN = SPI1_SDO_PIN
)
// MEMs accelerometer
diff --git a/src/machine/board_trinket.go b/src/machine/board_trinket.go
index ba9758b5d..743eab643 100644
--- a/src/machine/board_trinket.go
+++ b/src/machine/board_trinket.go
@@ -60,9 +60,9 @@ func init() {
// SPI pins
const (
- SPI0_SCK_PIN = D3
- SPI0_MOSI_PIN = D4
- SPI0_MISO_PIN = D2
+ SPI0_SCK_PIN = D3
+ SPI0_SDO_PIN = D4
+ SPI0_SDI_PIN = D2
)
// SPI on the Trinket M0.
diff --git a/src/machine/board_wioterminal.go b/src/machine/board_wioterminal.go
index 19cb39ecb..7fde5c721 100644
--- a/src/machine/board_wioterminal.go
+++ b/src/machine/board_wioterminal.go
@@ -86,8 +86,8 @@ const (
BCM6 = PB13 // GCLK
BCM7 = PA05 // DAC1
BCM8 = PB01 // SPI SS
- BCM9 = PB00 // SPI MISO
- BCM10 = PB02 // SPI MOSI
+ BCM9 = PB00 // SPI SDI
+ BCM10 = PB02 // SPI SDO
BCM11 = PB03 // SPI SCK
BCM12 = PB06
BCM13 = PA07
@@ -216,58 +216,58 @@ const (
WIO_LIS3DH_INT = PC21
// SPI
- PIN_SPI_MISO = PB00
- PIN_SPI_MOSI = PB02
- PIN_SPI_SCK = PB03
- PIN_SPI_SS = PB01
+ PIN_SPI_SDI = PB00
+ PIN_SPI_SDO = PB02
+ PIN_SPI_SCK = PB03
+ PIN_SPI_SS = PB01
- SS = PIN_SPI_SS
- MOSI = PIN_SPI_MOSI
- MISO = PIN_SPI_MISO
- SCK = PIN_SPI_SCK
+ SS = PIN_SPI_SS
+ SDO = PIN_SPI_SDO
+ SDI = PIN_SPI_SDI
+ SCK = PIN_SPI_SCK
// SPI1 RTL8720D_SPI
- PIN_SPI1_MISO = PC24
- PIN_SPI1_MOSI = PB24
- PIN_SPI1_SCK = PB25
- PIN_SPI1_SS = PC25
+ PIN_SPI1_SDI = PC24
+ PIN_SPI1_SDO = PB24
+ PIN_SPI1_SCK = PB25
+ PIN_SPI1_SS = PC25
- SS1 = PIN_SPI1_SS
- MOSI1 = PIN_SPI1_MOSI
- MISO1 = PIN_SPI1_MISO
- SCK1 = PIN_SPI1_SCK
+ SS1 = PIN_SPI1_SS
+ SDO1 = PIN_SPI1_SDO
+ SDI1 = PIN_SPI1_SDI
+ SCK1 = PIN_SPI1_SCK
// SPI2 SD_SPI
- PIN_SPI2_MISO = PC18
- PIN_SPI2_MOSI = PC16
- PIN_SPI2_SCK = PC17
- PIN_SPI2_SS = PC19
+ PIN_SPI2_SDI = PC18
+ PIN_SPI2_SDO = PC16
+ PIN_SPI2_SCK = PC17
+ PIN_SPI2_SS = PC19
- SS2 = PIN_SPI2_SS
- MOSI2 = PIN_SPI2_MOSI
- MISO2 = PIN_SPI2_MISO
- SCK2 = PIN_SPI2_SCK
+ SS2 = PIN_SPI2_SS
+ SDO2 = PIN_SPI2_SDO
+ SDI2 = PIN_SPI2_SDI
+ SCK2 = PIN_SPI2_SCK
// SPI3 LCD_SPI
- PIN_SPI3_MISO = PB18
- PIN_SPI3_MOSI = PB19
- PIN_SPI3_SCK = PB20
- PIN_SPI3_SS = PB21
+ PIN_SPI3_SDI = PB18
+ PIN_SPI3_SDO = PB19
+ PIN_SPI3_SCK = PB20
+ PIN_SPI3_SS = PB21
- SS3 = PIN_SPI3_SS
- MOSI3 = PIN_SPI3_MOSI
- MISO3 = PIN_SPI3_MISO
- SCK3 = PIN_SPI3_SCK
+ SS3 = PIN_SPI3_SS
+ SDO3 = PIN_SPI3_SDO
+ SDI3 = PIN_SPI3_SDI
+ SCK3 = PIN_SPI3_SCK
// Needed for SD library
- SDCARD_MISO_PIN = PIN_SPI2_MISO
- SDCARD_MOSI_PIN = PIN_SPI2_MOSI
- SDCARD_SCK_PIN = PIN_SPI2_SCK
- SDCARD_SS_PIN = PIN_SPI2_SS
- SDCARD_DET_PIN = PD21
-
- LCD_MISO_PIN = PIN_SPI3_MISO
- LCD_MOSI_PIN = PIN_SPI3_MOSI
+ SDCARD_SDI_PIN = PIN_SPI2_SDI
+ SDCARD_SDO_PIN = PIN_SPI2_SDO
+ SDCARD_SCK_PIN = PIN_SPI2_SCK
+ SDCARD_SS_PIN = PIN_SPI2_SS
+ SDCARD_DET_PIN = PD21
+
+ LCD_SDI_PIN = PIN_SPI3_SDI
+ LCD_SDO_PIN = PIN_SPI3_SDO
LCD_SCK_PIN = PIN_SPI3_SCK
LCD_SS_PIN = PIN_SPI3_SS
LCD_DC = PC06
@@ -281,10 +281,10 @@ const (
LCD_YD = PC13
// Needed for RTL8720D
- RTL8720D_MISO_PIN = PIN_SPI1_MISO
- RTL8720D_MOSI_PIN = PIN_SPI1_MOSI
- RTL8720D_SCK_PIN = PIN_SPI1_SCK
- RTL8720D_SS_PIN = PIN_SPI1_SS
+ RTL8720D_SDI_PIN = PIN_SPI1_SDI
+ RTL8720D_SDO_PIN = PIN_SPI1_SDO
+ RTL8720D_SCK_PIN = PIN_SPI1_SCK
+ RTL8720D_SS_PIN = PIN_SPI1_SS
//QSPI Pins
PIN_QSPI_IO0 = PA08
@@ -357,24 +357,24 @@ const (
// SPI pins
const (
- SPI0_SCK_PIN = SCK // SCK: SERCOM5/PAD[1]
- SPI0_MOSI_PIN = MOSI // MOSI: SERCOM5/PAD[0]
- SPI0_MISO_PIN = MISO // MISO: SERCOM5/PAD[2]
+ SPI0_SCK_PIN = SCK // SCK: SERCOM5/PAD[1]
+ SPI0_SDO_PIN = SDO // SDO: SERCOM5/PAD[0]
+ SPI0_SDI_PIN = SDI // SDI: SERCOM5/PAD[2]
// RTL8720D
- SPI1_SCK_PIN = SCK1 // SCK: SERCOM0/PAD[1]
- SPI1_MOSI_PIN = MOSI1 // MOSI: SERCOM0/PAD[0]
- SPI1_MISO_PIN = MISO1 // MISO: SERCOM0/PAD[2]
+ SPI1_SCK_PIN = SCK1 // SCK: SERCOM0/PAD[1]
+ SPI1_SDO_PIN = SDO1 // SDO: SERCOM0/PAD[0]
+ SPI1_SDI_PIN = SDI1 // SDI: SERCOM0/PAD[2]
// SD
- SPI2_SCK_PIN = SCK2 // SCK: SERCOM6/PAD[1]
- SPI2_MOSI_PIN = MOSI2 // MOSI: SERCOM6/PAD[0]
- SPI2_MISO_PIN = MISO2 // MISO: SERCOM6/PAD[2]
+ SPI2_SCK_PIN = SCK2 // SCK: SERCOM6/PAD[1]
+ SPI2_SDO_PIN = SDO2 // SDO: SERCOM6/PAD[0]
+ SPI2_SDI_PIN = SDI2 // SDI: SERCOM6/PAD[2]
// LCD
- SPI3_SCK_PIN = SCK3 // SCK: SERCOM7/PAD[1]
- SPI3_MOSI_PIN = MOSI3 // MOSI: SERCOM7/PAD[3]
- SPI3_MISO_PIN = MISO3 // MISO: SERCOM7/PAD[2]
+ SPI3_SCK_PIN = SCK3 // SCK: SERCOM7/PAD[1]
+ SPI3_SDO_PIN = SDO3 // SDO: SERCOM7/PAD[3]
+ SPI3_SDI_PIN = SDI3 // SDI: SERCOM7/PAD[2]
)
// USB CDC identifiers
diff --git a/src/machine/board_x9pro.go b/src/machine/board_x9pro.go
index 252f35122..d615b5983 100644
--- a/src/machine/board_x9pro.go
+++ b/src/machine/board_x9pro.go
@@ -4,14 +4,14 @@ package machine
// https://hackaday.io/project/144350-hacking-wearables-for-mental-health-and-more/details
const (
- LED Pin = 4 // HR LED pin
- UART_TX_PIN Pin = NoPin
- UART_RX_PIN Pin = NoPin
- SCL_PIN Pin = NoPin
- SDA_PIN Pin = NoPin
- SPI0_SCK_PIN Pin = 18
- SPI0_MISO_PIN Pin = 19
- SPI0_MOSI_PIN Pin = 20
+ LED Pin = 4 // HR LED pin
+ UART_TX_PIN Pin = NoPin
+ UART_RX_PIN Pin = NoPin
+ SCL_PIN Pin = NoPin
+ SDA_PIN Pin = NoPin
+ SPI0_SCK_PIN Pin = 18
+ SPI0_SDI_PIN Pin = 19
+ SPI0_SDO_PIN Pin = 20
)
// LCD pins.
@@ -20,7 +20,7 @@ const (
OLED_RES Pin = 14 // reset pin
OLED_DC Pin = 13 // data/command
OLED_SCK Pin = 12 // SPI clock
- OLED_MOSI Pin = 11 // SPI MOSI (master-out, slave-in)
+ OLED_SDO Pin = 11 // SPI SDO (chip-out, peripheral-in)
OLED_LED_POW Pin = 16
OLED_IC_POW Pin = 17
)
diff --git a/src/machine/board_xiao.go b/src/machine/board_xiao.go
index 34a88106b..4f84104b7 100644
--- a/src/machine/board_xiao.go
+++ b/src/machine/board_xiao.go
@@ -21,8 +21,8 @@ const (
D6 = PB08 // can be used for PWM or UART1 TX
D7 = PB09 // can be used for PWM or UART1 RX
D8 = PA07 // can be used for PWM or SPI SCK
- D9 = PA05 // can be used for PWM or SPI MISO
- D10 = PA06 // can be used for PWM or SPI MOSI
+ D9 = PA05 // can be used for PWM or SPI SDI
+ D10 = PA06 // can be used for PWM or SPI SDO
)
// Analog pins
@@ -89,9 +89,9 @@ var (
// SPI pins
const (
- SPI0_SCK_PIN = PA07 // SCK: SERCOM0/PAD[3]
- SPI0_MOSI_PIN = PA06 // MOSI: SERCOM0/PAD[2]
- SPI0_MISO_PIN = PA05 // MISO: SERCOM0/PAD[1]
+ SPI0_SCK_PIN = PA07 // SCK: SERCOM0/PAD[3]
+ SPI0_SDO_PIN = PA06 // SDO: SERCOM0/PAD[2]
+ SPI0_SDI_PIN = PA05 // SDI: SERCOM0/PAD[1]
)
// SPI on the Xiao
diff --git a/src/machine/i2s.go b/src/machine/i2s.go
index 93ff7c56e..caecc0661 100644
--- a/src/machine/i2s.go
+++ b/src/machine/i2s.go
@@ -15,8 +15,8 @@ type I2SClockSource uint8
type I2SDataFormat uint8
const (
- I2SModeMaster I2SMode = iota
- I2SModeSlave
+ I2SModeSource I2SMode = iota
+ I2SModeReceiver
I2SModePDM
)
@@ -41,14 +41,14 @@ const (
// All fields are optional and may not be required or used on a particular platform.
type I2SConfig struct {
- SCK Pin
- WS Pin
- SD Pin
- Mode I2SMode
- Standard I2SStandard
- ClockSource I2SClockSource
- DataFormat I2SDataFormat
- AudioFrequency uint32
- MasterClockOutput bool
- Stereo bool
+ SCK Pin
+ WS Pin
+ SD Pin
+ Mode I2SMode
+ Standard I2SStandard
+ ClockSource I2SClockSource
+ DataFormat I2SDataFormat
+ AudioFrequency uint32
+ MainClockOutput bool
+ Stereo bool
}
diff --git a/src/machine/machine_atmega.go b/src/machine/machine_atmega.go
index 147d80ffe..6e6307d56 100644
--- a/src/machine/machine_atmega.go
+++ b/src/machine/machine_atmega.go
@@ -27,7 +27,7 @@ func (i2c I2C) Configure(config I2CConfig) {
// twi bit rate formula from atmega128 manual pg. 204:
// SCL Frequency = CPU Clock Frequency / (16 + (2 * TWBR))
- // NOTE: TWBR should be 10 or higher for master mode.
+ // NOTE: TWBR should be 10 or higher for controller mode.
// It is 72 for a 16mhz board with 100kHz TWI
avr.TWBR.Set(uint8(((CPUFrequency() / config.Frequency) - 16) / 2))
diff --git a/src/machine/machine_atsamd21.go b/src/machine/machine_atsamd21.go
index 916802e8c..c8656029d 100644
--- a/src/machine/machine_atsamd21.go
+++ b/src/machine/machine_atsamd21.go
@@ -648,7 +648,7 @@ func (i2c I2C) Configure(config I2CConfig) error {
i2c.Bus.SYNCBUSY.HasBits(sam.SERCOM_I2CM_SYNCBUSY_SWRST) {
}
- // Set i2c master mode
+ // Set i2c controller mode
//SERCOM_I2CM_CTRLA_MODE( I2C_MASTER_OPERATION )
i2c.Bus.CTRLA.Set(sam.SERCOM_I2CM_CTRLA_MODE_I2C_MASTER << sam.SERCOM_I2CM_CTRLA_MODE_Pos) // |
@@ -722,7 +722,7 @@ func (i2c I2C) Tx(addr uint16, w, r []byte) error {
// wait transmission complete
for !i2c.Bus.INTFLAG.HasBits(sam.SERCOM_I2CM_INTFLAG_SB) {
- // If the slave NACKS the address, the MB bit will be set.
+ // If the peripheral NACKS the address, the MB bit will be set.
// In that case, send a stop condition and return error.
if i2c.Bus.INTFLAG.HasBits(sam.SERCOM_I2CM_INTFLAG_MB) {
i2c.Bus.CTRLB.SetBits(wireCmdStop << sam.SERCOM_I2CM_CTRLB_CMD_Pos) // Stop condition
@@ -1074,8 +1074,8 @@ type SPI struct {
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
@@ -1083,10 +1083,10 @@ type SPIConfig struct {
// Configure is intended to setup the SPI interface.
func (spi SPI) Configure(config SPIConfig) error {
// Use default pins if not set.
- if config.SCK == 0 && config.MOSI == 0 && config.MISO == 0 {
+ if config.SCK == 0 && config.SDO == 0 && config.SDI == 0 {
config.SCK = SPI0_SCK_PIN
- config.MOSI = SPI0_MOSI_PIN
- config.MISO = SPI0_MISO_PIN
+ config.SDO = SPI0_SDO_PIN
+ config.SDI = SPI0_SDI_PIN
}
// set default frequency
@@ -1094,27 +1094,27 @@ func (spi SPI) Configure(config SPIConfig) error {
config.Frequency = 4000000
}
- // Determine the input pinout (for MISO).
- misoPinMode, misoPad, ok := findPinPadMapping(spi.SERCOM, config.MISO)
+ // Determine the input pinout (for SDI).
+ SDIPinMode, SDIPad, ok := findPinPadMapping(spi.SERCOM, config.SDI)
if !ok {
return ErrInvalidInputPin
}
- dataInPinout := misoPad // mapped directly
+ dataInPinout := SDIPad // mapped directly
- // Determine the output pinout (for MOSI/SCK).
+ // Determine the output pinout (for SDO/SCK).
// See table 26-7 on page 494 of the datasheet.
var dataOutPinout uint32
sckPinMode, sckPad, ok := findPinPadMapping(spi.SERCOM, config.SCK)
if !ok {
return ErrInvalidOutputPin
}
- mosiPinMode, mosiPad, ok := findPinPadMapping(spi.SERCOM, config.MOSI)
+ SDOPinMode, SDOPad, ok := findPinPadMapping(spi.SERCOM, config.SDO)
if !ok {
return ErrInvalidOutputPin
}
switch sckPad {
case 1:
- switch mosiPad {
+ switch SDOPad {
case 0:
dataOutPinout = 0x0
case 3:
@@ -1123,7 +1123,7 @@ func (spi SPI) Configure(config SPIConfig) error {
return ErrInvalidOutputPin
}
case 3:
- switch mosiPad {
+ switch SDOPad {
case 2:
dataOutPinout = 0x1
case 0:
@@ -1142,8 +1142,8 @@ func (spi SPI) Configure(config SPIConfig) error {
// enable pins
config.SCK.Configure(PinConfig{Mode: sckPinMode})
- config.MOSI.Configure(PinConfig{Mode: mosiPinMode})
- config.MISO.Configure(PinConfig{Mode: misoPinMode})
+ config.SDO.Configure(PinConfig{Mode: SDOPinMode})
+ config.SDI.Configure(PinConfig{Mode: SDIPinMode})
// reset SERCOM
spi.Bus.CTRLA.SetBits(sam.SERCOM_SPI_CTRLA_SWRST)
@@ -1157,7 +1157,7 @@ func (spi SPI) Configure(config SPIConfig) error {
dataOrder = 1
}
- // Set SPI master
+ // Set SPI mode to controller
spi.Bus.CTRLA.Set((sam.SERCOM_SPI_CTRLA_MODE_SPI_MASTER << sam.SERCOM_SPI_CTRLA_MODE_Pos) |
(dataOutPinout << sam.SERCOM_SPI_CTRLA_DOPO_Pos) |
(dataInPinout << sam.SERCOM_SPI_CTRLA_DIPO_Pos) |
diff --git a/src/machine/machine_atsamd51.go b/src/machine/machine_atsamd51.go
index 5351f5f56..90064776a 100644
--- a/src/machine/machine_atsamd51.go
+++ b/src/machine/machine_atsamd51.go
@@ -1111,7 +1111,7 @@ func (i2c I2C) Configure(config I2CConfig) error {
i2c.Bus.SYNCBUSY.HasBits(sam.SERCOM_I2CM_SYNCBUSY_SWRST) {
}
- // Set i2c master mode
+ // Set i2c controller mode
//SERCOM_I2CM_CTRLA_MODE( I2C_MASTER_OPERATION )
// sam.SERCOM_I2CM_CTRLA_MODE_I2C_MASTER = 5?
i2c.Bus.CTRLA.Set(5 << sam.SERCOM_I2CM_CTRLA_MODE_Pos) // |
@@ -1186,7 +1186,7 @@ func (i2c I2C) Tx(addr uint16, w, r []byte) error {
// wait transmission complete
for !i2c.Bus.INTFLAG.HasBits(sam.SERCOM_I2CM_INTFLAG_SB) {
- // If the slave NACKS the address, the MB bit will be set.
+ // If the peripheral NACKS the address, the MB bit will be set.
// In that case, send a stop condition and return error.
if i2c.Bus.INTFLAG.HasBits(sam.SERCOM_I2CM_INTFLAG_MB) {
i2c.Bus.CTRLB.SetBits(wireCmdStop << sam.SERCOM_I2CM_CTRLB_CMD_Pos) // Stop condition
@@ -1309,8 +1309,8 @@ type SPI struct {
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
@@ -1318,10 +1318,10 @@ type SPIConfig struct {
// Configure is intended to setup the SPI interface.
func (spi SPI) Configure(config SPIConfig) error {
// Use default pins if not set.
- if config.SCK == 0 && config.MOSI == 0 && config.MISO == 0 {
+ if config.SCK == 0 && config.SDO == 0 && config.SDI == 0 {
config.SCK = SPI0_SCK_PIN
- config.MOSI = SPI0_MOSI_PIN
- config.MISO = SPI0_MISO_PIN
+ config.SDO = SPI0_SDO_PIN
+ config.SDI = SPI0_SDI_PIN
}
// set default frequency
@@ -1329,17 +1329,17 @@ func (spi SPI) Configure(config SPIConfig) error {
config.Frequency = 4000000
}
- // Determine the input pinout (for MISO).
+ // Determine the input pinout (for SDI).
var dataInPinout uint32
- misoPinMode, misoPad, ok := findPinPadMapping(spi.SERCOM, config.MISO)
- if config.MISO != NoPin {
+ SDIPinMode, SDIPad, ok := findPinPadMapping(spi.SERCOM, config.SDI)
+ if config.SDI != NoPin {
if !ok {
return ErrInvalidInputPin
}
- dataInPinout = misoPad // mapped directly
+ dataInPinout = SDIPad // mapped directly
}
- // Determine the output pinout (for MOSI/SCK).
+ // Determine the output pinout (for SDO/SCK).
// See DOPO field in the CTRLA register on page 986 of the datasheet.
var dataOutPinout uint32
sckPinMode, sckPad, ok := findPinPadMapping(spi.SERCOM, config.SCK)
@@ -1347,11 +1347,11 @@ func (spi SPI) Configure(config SPIConfig) error {
// SCK pad must always be 1
return ErrInvalidOutputPin
}
- mosiPinMode, mosiPad, ok := findPinPadMapping(spi.SERCOM, config.MOSI)
+ SDOPinMode, SDOPad, ok := findPinPadMapping(spi.SERCOM, config.SDO)
if !ok {
return ErrInvalidOutputPin
}
- switch mosiPad {
+ switch SDOPad {
case 0:
dataOutPinout = 0x0
case 3:
@@ -1367,9 +1367,9 @@ func (spi SPI) Configure(config SPIConfig) error {
// enable pins
config.SCK.Configure(PinConfig{Mode: sckPinMode})
- config.MOSI.Configure(PinConfig{Mode: mosiPinMode})
- if config.MISO != NoPin {
- config.MISO.Configure(PinConfig{Mode: misoPinMode})
+ config.SDO.Configure(PinConfig{Mode: SDOPinMode})
+ if config.SDI != NoPin {
+ config.SDI.Configure(PinConfig{Mode: SDIPinMode})
}
// reset SERCOM
@@ -1384,7 +1384,7 @@ func (spi SPI) Configure(config SPIConfig) error {
dataOrder = 1
}
- // Set SPI master
+ // Set SPI controller
// SERCOM_SPIM_CTRLA_MODE_SPI_MASTER = 3
spi.Bus.CTRLA.Set((3 << sam.SERCOM_SPIM_CTRLA_MODE_Pos) |
(dataOutPinout << sam.SERCOM_SPIM_CTRLA_DOPO_Pos) |
diff --git a/src/machine/machine_fe310.go b/src/machine/machine_fe310.go
index 6bd238421..2e3be170e 100644
--- a/src/machine/machine_fe310.go
+++ b/src/machine/machine_fe310.go
@@ -101,8 +101,8 @@ type SPI struct {
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
@@ -110,16 +110,16 @@ type SPIConfig struct {
// Configure is intended to setup the SPI interface.
func (spi SPI) Configure(config SPIConfig) error {
// Use default pins if not set.
- if config.SCK == 0 && config.MOSI == 0 && config.MISO == 0 {
+ if config.SCK == 0 && config.SDO == 0 && config.SDI == 0 {
config.SCK = SPI0_SCK_PIN
- config.MOSI = SPI0_MOSI_PIN
- config.MISO = SPI0_MISO_PIN
+ config.SDO = SPI0_SDO_PIN
+ config.SDI = SPI0_SDI_PIN
}
// enable pins for SPI
config.SCK.Configure(PinConfig{Mode: PinSPI})
- config.MOSI.Configure(PinConfig{Mode: PinSPI})
- config.MISO.Configure(PinConfig{Mode: PinSPI})
+ config.SDO.Configure(PinConfig{Mode: PinSPI})
+ config.SDI.Configure(PinConfig{Mode: PinSPI})
// set default frequency
if config.Frequency == 0 {
diff --git a/src/machine/machine_generic.go b/src/machine/machine_generic.go
index ace5b1cb4..7e2d8ca3d 100644
--- a/src/machine/machine_generic.go
+++ b/src/machine/machine_generic.go
@@ -47,13 +47,13 @@ type SPI struct {
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
Mode uint8
}
func (spi SPI) Configure(config SPIConfig) {
- spiConfigure(spi.Bus, config.SCK, config.MOSI, config.MISO)
+ spiConfigure(spi.Bus, config.SCK, config.SDO, config.SDI)
}
// Transfer writes/reads a single byte using the SPI interface.
@@ -62,7 +62,7 @@ func (spi SPI) Transfer(w byte) (byte, error) {
}
//export __tinygo_spi_configure
-func spiConfigure(bus uint8, sck Pin, mosi Pin, miso Pin)
+func spiConfigure(bus uint8, sck Pin, SDO Pin, SDI Pin)
//export __tinygo_spi_transfer
func spiTransfer(bus uint8, w uint8) uint8
diff --git a/src/machine/machine_k210.go b/src/machine/machine_k210.go
index caa1592ba..a7dabfd3d 100644
--- a/src/machine/machine_k210.go
+++ b/src/machine/machine_k210.go
@@ -397,21 +397,21 @@ type SPI struct {
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
// Configure is intended to setup the SPI interface.
// Only SPI controller 0 and 1 can be used because SPI2 is a special
-// slave-mode controller and SPI3 is used for flashing.
+// peripheral-mode controller and SPI3 is used for flashing.
func (spi SPI) Configure(config SPIConfig) error {
// Use default pins if not set.
- if config.SCK == 0 && config.MOSI == 0 && config.MISO == 0 {
+ if config.SCK == 0 && config.SDO == 0 && config.SDI == 0 {
config.SCK = SPI0_SCK_PIN
- config.MOSI = SPI0_MOSI_PIN
- config.MISO = SPI0_MISO_PIN
+ config.SDO = SPI0_SDO_PIN
+ config.SDI = SPI0_SDI_PIN
}
// Enable APB2 clock.
@@ -425,8 +425,8 @@ func (spi SPI) Configure(config SPIConfig) error {
// Initialize pins.
config.SCK.SetFPIOAFunction(FUNC_SPI0_SCLK)
- config.MOSI.SetFPIOAFunction(FUNC_SPI0_D0)
- config.MISO.SetFPIOAFunction(FUNC_SPI0_D1)
+ config.SDO.SetFPIOAFunction(FUNC_SPI0_D0)
+ config.SDI.SetFPIOAFunction(FUNC_SPI0_D1)
case kendryte.SPI1:
// Initialize SPI clock.
kendryte.SYSCTL.CLK_EN_PERI.SetBits(kendryte.SYSCTL_CLK_EN_PERI_SPI1_CLK_EN)
@@ -434,8 +434,8 @@ func (spi SPI) Configure(config SPIConfig) error {
// Initialize pins.
config.SCK.SetFPIOAFunction(FUNC_SPI1_SCLK)
- config.MOSI.SetFPIOAFunction(FUNC_SPI1_D0)
- config.MISO.SetFPIOAFunction(FUNC_SPI1_D1)
+ config.SDO.SetFPIOAFunction(FUNC_SPI1_D0)
+ config.SDI.SetFPIOAFunction(FUNC_SPI1_D1)
default:
return errUnsupportedSPIController
}
@@ -567,7 +567,7 @@ func (i2c I2C) Configure(config I2CConfig) error {
// It clocks out the given address, writes the bytes in w, reads back len(r)
// bytes and stores them in r, and generates a stop condition on the bus.
func (i2c I2C) Tx(addr uint16, w, r []byte) error {
- // Set slave address.
+ // Set peripheral address.
i2c.Bus.TAR.Set(uint32(addr))
// Enable controller.
i2c.Bus.ENABLE.Set(1)
diff --git a/src/machine/machine_nrf.go b/src/machine/machine_nrf.go
index 3d65ad578..2539cb856 100644
--- a/src/machine/machine_nrf.go
+++ b/src/machine/machine_nrf.go
@@ -325,8 +325,8 @@ var (
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
@@ -387,7 +387,7 @@ func (spi SPI) Configure(config SPIConfig) {
spi.Bus.CONFIG.Set(conf)
// set pins
- spi.setPins(config.SCK, config.MOSI, config.MISO)
+ spi.setPins(config.SCK, config.SDO, config.SDI)
// Re-enable bus now that it is configured.
spi.Bus.ENABLE.Set(nrf.SPI_ENABLE_ENABLE_Enabled)
diff --git a/src/machine/machine_nrf51.go b/src/machine/machine_nrf51.go
index 416bc5bed..464a1a2c3 100644
--- a/src/machine/machine_nrf51.go
+++ b/src/machine/machine_nrf51.go
@@ -30,17 +30,17 @@ func (i2c I2C) setPins(scl, sda Pin) {
}
// SPI
-func (spi SPI) setPins(sck, mosi, miso Pin) {
+func (spi SPI) setPins(sck, sdo, sdi Pin) {
if sck == 0 {
sck = SPI0_SCK_PIN
}
- if mosi == 0 {
- mosi = SPI0_MOSI_PIN
+ if sdo == 0 {
+ sdo = SPI0_SDO_PIN
}
- if miso == 0 {
- miso = SPI0_MISO_PIN
+ if sdi == 0 {
+ sdi = SPI0_SDI_PIN
}
spi.Bus.PSELSCK.Set(uint32(sck))
- spi.Bus.PSELMOSI.Set(uint32(mosi))
- spi.Bus.PSELMISO.Set(uint32(miso))
+ spi.Bus.PSELMOSI.Set(uint32(sdo))
+ spi.Bus.PSELMISO.Set(uint32(sdi))
}
diff --git a/src/machine/machine_nrf52.go b/src/machine/machine_nrf52.go
index 003be7a69..880126a11 100644
--- a/src/machine/machine_nrf52.go
+++ b/src/machine/machine_nrf52.go
@@ -31,19 +31,19 @@ func (i2c I2C) setPins(scl, sda Pin) {
}
// SPI
-func (spi SPI) setPins(sck, mosi, miso Pin) {
+func (spi SPI) setPins(sck, sdo, sdi Pin) {
if sck == 0 {
sck = SPI0_SCK_PIN
}
- if mosi == 0 {
- mosi = SPI0_MOSI_PIN
+ if sdo == 0 {
+ sdo = SPI0_SDO_PIN
}
- if miso == 0 {
- miso = SPI0_MISO_PIN
+ if sdi == 0 {
+ sdi = SPI0_SDI_PIN
}
spi.Bus.PSEL.SCK.Set(uint32(sck))
- spi.Bus.PSEL.MOSI.Set(uint32(mosi))
- spi.Bus.PSEL.MISO.Set(uint32(miso))
+ spi.Bus.PSEL.MOSI.Set(uint32(sdo))
+ spi.Bus.PSEL.MISO.Set(uint32(sdi))
}
// InitADC initializes the registers needed for ADC.
diff --git a/src/machine/machine_nrf52840.go b/src/machine/machine_nrf52840.go
index c7e608269..7afb9286e 100644
--- a/src/machine/machine_nrf52840.go
+++ b/src/machine/machine_nrf52840.go
@@ -83,19 +83,19 @@ func (i2c I2C) setPins(scl, sda Pin) {
}
// SPI
-func (spi SPI) setPins(sck, mosi, miso Pin) {
+func (spi SPI) setPins(sck, sdo, sdi Pin) {
if sck == 0 {
sck = SPI0_SCK_PIN
}
- if mosi == 0 {
- mosi = SPI0_MOSI_PIN
+ if sdo == 0 {
+ sdo = SPI0_SDO_PIN
}
- if miso == 0 {
- miso = SPI0_MISO_PIN
+ if sdi == 0 {
+ sdi = SPI0_SDI_PIN
}
spi.Bus.PSEL.SCK.Set(uint32(sck))
- spi.Bus.PSEL.MOSI.Set(uint32(mosi))
- spi.Bus.PSEL.MISO.Set(uint32(miso))
+ spi.Bus.PSEL.MOSI.Set(uint32(sdo))
+ spi.Bus.PSEL.MISO.Set(uint32(sdi))
}
// InitADC initializes the registers needed for ADC.
diff --git a/src/machine/machine_stm32_moder_gpio.go b/src/machine/machine_stm32_moder_gpio.go
index da1a2d93b..69d5ab8ee 100644
--- a/src/machine/machine_stm32_moder_gpio.go
+++ b/src/machine/machine_stm32_moder_gpio.go
@@ -27,9 +27,9 @@ const (
PinModeI2CSDA PinMode = 7
// for SPI
- PinModeSPICLK PinMode = 8
- PinModeSPIMOSI PinMode = 9
- PinModeSPIMISO PinMode = 10
+ PinModeSPICLK PinMode = 8
+ PinModeSPISDO PinMode = 9
+ PinModeSPISDI PinMode = 10
// for analog/ADC
PinInputAnalog PinMode = 11
@@ -102,12 +102,12 @@ func (p Pin) ConfigureAltFunc(config PinConfig, altFunc stm32.AltFunc) {
port.OSPEEDR.ReplaceBits(stm32.GPIOSpeedLow, 0x3, pos)
port.PUPDR.ReplaceBits(stm32.GPIOPUPDRFloating, 0x3, pos)
p.SetAltFunc(altFunc)
- case PinModeSPIMOSI:
+ case PinModeSPISDO:
port.MODER.ReplaceBits(stm32.GPIOModeOutputAltFunc, 0x3, pos)
port.OSPEEDR.ReplaceBits(stm32.GPIOSpeedLow, 0x3, pos)
port.PUPDR.ReplaceBits(stm32.GPIOPUPDRFloating, 0x3, pos)
p.SetAltFunc(altFunc)
- case PinModeSPIMISO:
+ case PinModeSPISDI:
port.MODER.ReplaceBits(stm32.GPIOModeOutputAltFunc, 0x3, pos)
port.OSPEEDR.ReplaceBits(stm32.GPIOSpeedLow, 0x3, pos)
port.PUPDR.ReplaceBits(stm32.GPIOPUPDRFloating, 0x3, pos)
diff --git a/src/machine/machine_stm32_spi.go b/src/machine/machine_stm32_spi.go
index fa18aacf5..2e14a4618 100644
--- a/src/machine/machine_stm32_spi.go
+++ b/src/machine/machine_stm32_spi.go
@@ -13,8 +13,8 @@ import (
type SPIConfig struct {
Frequency uint32
SCK Pin
- MOSI Pin
- MISO Pin
+ SDO Pin
+ SDI Pin
LSBFirst bool
Mode uint8
}
@@ -56,20 +56,20 @@ func (spi SPI) Configure(config SPIConfig) {
conf &^= (1 << stm32.SPI_CR1_CPHA_Pos)
}
- // set to SPI master
+ // set to SPI controller
conf |= stm32.SPI_CR1_MSTR
- // disable MCU acting as SPI slave
+ // disable MCU acting as SPI peripheral
conf |= stm32.SPI_CR1_SSM | stm32.SPI_CR1_SSI
// now set the configuration
spi.Bus.CR1.Set(conf)
// init pins
- if config.SCK == 0 && config.MOSI == 0 && config.MISO == 0 {
+ if config.SCK == 0 && config.SDO == 0 && config.SDI == 0 {
config.SCK = SPI0_SCK_PIN
- config.MOSI = SPI0_MOSI_PIN
- config.MISO = SPI0_MISO_PIN
+ config.SDO = SPI0_SDO_PIN
+ config.SDI = SPI0_SDI_PIN
}
spi.configurePins(config)
diff --git a/src/machine/machine_stm32f103xx.go b/src/machine/machine_stm32f103xx.go
index 0ec3dcccb..4b88fd2f7 100644
--- a/src/machine/machine_stm32f103xx.go
+++ b/src/machine/machine_stm32f103xx.go
@@ -191,8 +191,8 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 {
// Configure SPI pins for input output and clock
func (spi SPI) configurePins(config SPIConfig) {
config.SCK.Configure(PinConfig{Mode: PinOutput50MHz + PinOutputModeAltPushPull})
- config.MOSI.Configure(PinConfig{Mode: PinOutput50MHz + PinOutputModeAltPushPull})
- config.MISO.Configure(PinConfig{Mode: PinInputModeFloating})
+ config.SDO.Configure(PinConfig{Mode: PinOutput50MHz + PinOutputModeAltPushPull})
+ config.SDI.Configure(PinConfig{Mode: PinInputModeFloating})
}
//---------- I2C related types and code
diff --git a/src/machine/machine_stm32f407.go b/src/machine/machine_stm32f407.go
index 7c67cfb83..16d1e10bf 100644
--- a/src/machine/machine_stm32f407.go
+++ b/src/machine/machine_stm32f407.go
@@ -164,6 +164,6 @@ func (spi SPI) getBaudRate(config SPIConfig) uint32 {
// Configure SPI pins for input output and clock
func (spi SPI) configurePins(config SPIConfig) {
config.SCK.ConfigureAltFunc(PinConfig{Mode: PinModeSPICLK}, spi.AltFuncSelector)
- config.MOSI.ConfigureAltFunc(PinConfig{Mode: PinModeSPIMOSI}, spi.AltFuncSelector)
- config.MISO.ConfigureAltFunc(PinConfig{Mode: PinModeSPIMISO}, spi.AltFuncSelector)
+ config.SDO.ConfigureAltFunc(PinConfig{Mode: PinModeSPISDO}, spi.AltFuncSelector)
+ config.SDI.ConfigureAltFunc(PinConfig{Mode: PinModeSPISDI}, spi.AltFuncSelector)
}
diff --git a/src/runtime/interrupt/interrupt_gameboyadvance.go b/src/runtime/interrupt/interrupt_gameboyadvance.go
index e4b202937..658a2b9c7 100644
--- a/src/runtime/interrupt/interrupt_gameboyadvance.go
+++ b/src/runtime/interrupt/interrupt_gameboyadvance.go
@@ -10,7 +10,7 @@ import (
var (
regInterruptEnable = (*volatile.Register16)(unsafe.Pointer(uintptr(0x4000200)))
regInterruptRequestFlags = (*volatile.Register16)(unsafe.Pointer(uintptr(0x4000202)))
- regInterruptMasterEnable = (*volatile.Register16)(unsafe.Pointer(uintptr(0x4000208)))
+ regGlobalInterruptEnable = (*volatile.Register16)(unsafe.Pointer(uintptr(0x4000208)))
)
// Enable enables this interrupt. Right after calling this function, the
@@ -49,9 +49,9 @@ type State uint8
// as you called Disable (this happens naturally with the pattern above).
func Disable() (state State) {
// Save the previous interrupt state.
- state = State(regInterruptMasterEnable.Get())
+ state = State(regGlobalInterruptEnable.Get())
// Disable all interrupts.
- regInterruptMasterEnable.Set(0)
+ regGlobalInterruptEnable.Set(0)
return
}
@@ -61,5 +61,5 @@ func Disable() (state State) {
// cricital sections.
func Restore(state State) {
// Restore interrupts to the previous state.
- regInterruptMasterEnable.Set(uint16(state))
+ regGlobalInterruptEnable.Set(uint16(state))
}