machine: reorder pin definitions to improve pin list on tinygo.org
Этот коммит содержится в:
родитель
411333327e
коммит
0a93347e1c
25 изменённых файлов: 174 добавлений и 142 удалений
|
@ -9,9 +9,6 @@ func CPUFrequency() uint32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AREF Pin = NoPin
|
|
||||||
LED Pin = PB7
|
|
||||||
|
|
||||||
A0 Pin = PF0
|
A0 Pin = PF0
|
||||||
A1 Pin = PF1
|
A1 Pin = PF1
|
||||||
A2 Pin = PF2
|
A2 Pin = PF2
|
||||||
|
@ -102,4 +99,7 @@ const (
|
||||||
D51 Pin = PB2
|
D51 Pin = PB2
|
||||||
D52 Pin = PB1
|
D52 Pin = PB1
|
||||||
D53 Pin = PB0
|
D53 Pin = PB0
|
||||||
|
|
||||||
|
AREF Pin = NoPin
|
||||||
|
LED Pin = PB7
|
||||||
)
|
)
|
||||||
|
|
|
@ -14,9 +14,6 @@ func CPUFrequency() uint32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AREF Pin = NoPin
|
|
||||||
LED Pin = PB7
|
|
||||||
|
|
||||||
A0 Pin = PF0
|
A0 Pin = PF0
|
||||||
A1 Pin = PF1
|
A1 Pin = PF1
|
||||||
A2 Pin = PF2
|
A2 Pin = PF2
|
||||||
|
@ -107,6 +104,9 @@ const (
|
||||||
D51 Pin = PB2
|
D51 Pin = PB2
|
||||||
D52 Pin = PB1
|
D52 Pin = PB1
|
||||||
D53 Pin = PB0
|
D53 Pin = PB0
|
||||||
|
|
||||||
|
AREF Pin = NoPin
|
||||||
|
LED Pin = PB7
|
||||||
)
|
)
|
||||||
|
|
||||||
// UART pins
|
// UART pins
|
||||||
|
|
|
@ -12,9 +12,6 @@ const RESET_MAGIC_VALUE = 0x07738135
|
||||||
|
|
||||||
// GPIO Pins
|
// GPIO Pins
|
||||||
const (
|
const (
|
||||||
RX0 Pin = PB23 // UART2 RX
|
|
||||||
TX1 Pin = PB22 // UART2 TX
|
|
||||||
|
|
||||||
D0 Pin = PA22 // PWM available
|
D0 Pin = PA22 // PWM available
|
||||||
D1 Pin = PA23 // PWM available
|
D1 Pin = PA23 // PWM available
|
||||||
D2 Pin = PA10 // PWM available
|
D2 Pin = PA10 // PWM available
|
||||||
|
@ -31,6 +28,9 @@ const (
|
||||||
D12 Pin = PA09 // PWM available, SCL
|
D12 Pin = PA09 // PWM available, SCL
|
||||||
D13 Pin = PB23 // RX
|
D13 Pin = PB23 // RX
|
||||||
D14 Pin = PB22 // TX
|
D14 Pin = PB22 // TX
|
||||||
|
|
||||||
|
RX0 Pin = PB23 // UART2 RX
|
||||||
|
TX1 Pin = PB22 // UART2 TX
|
||||||
)
|
)
|
||||||
|
|
||||||
// Analog pins
|
// Analog pins
|
||||||
|
|
|
@ -12,9 +12,6 @@ const RESET_MAGIC_VALUE = 0x07738135
|
||||||
|
|
||||||
// GPIO Pins
|
// GPIO Pins
|
||||||
const (
|
const (
|
||||||
RX0 Pin = PB23 // UART1 RX
|
|
||||||
TX1 Pin = PB22 // UART1 TX
|
|
||||||
|
|
||||||
D0 Pin = PA22 // PWM available
|
D0 Pin = PA22 // PWM available
|
||||||
D1 Pin = PA23 // PWM available
|
D1 Pin = PA23 // PWM available
|
||||||
D2 Pin = PA10 // PWM available
|
D2 Pin = PA10 // PWM available
|
||||||
|
@ -31,6 +28,9 @@ const (
|
||||||
D12 Pin = PA09 // PWM available, SCL
|
D12 Pin = PA09 // PWM available, SCL
|
||||||
D13 Pin = PB23 // RX
|
D13 Pin = PB23 // RX
|
||||||
D14 Pin = PB22 // TX
|
D14 Pin = PB22 // TX
|
||||||
|
|
||||||
|
RX0 Pin = PB23 // UART1 RX
|
||||||
|
TX1 Pin = PB22 // UART1 TX
|
||||||
)
|
)
|
||||||
|
|
||||||
// Analog pins
|
// Analog pins
|
||||||
|
|
|
@ -28,14 +28,6 @@ const (
|
||||||
D13 = PA17 // PWM available
|
D13 = PA17 // PWM available
|
||||||
)
|
)
|
||||||
|
|
||||||
// LEDs on the Arduino Zero
|
|
||||||
const (
|
|
||||||
LED = LED1
|
|
||||||
LED1 Pin = D13
|
|
||||||
LED2 Pin = PA27 // TX LED
|
|
||||||
LED3 Pin = PB03 // RX LED
|
|
||||||
)
|
|
||||||
|
|
||||||
// ADC pins
|
// ADC pins
|
||||||
const (
|
const (
|
||||||
AREF Pin = PA03
|
AREF Pin = PA03
|
||||||
|
@ -47,6 +39,14 @@ const (
|
||||||
ADC5 Pin = PB02
|
ADC5 Pin = PB02
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LEDs on the Arduino Zero
|
||||||
|
const (
|
||||||
|
LED = LED1
|
||||||
|
LED1 Pin = D13
|
||||||
|
LED2 Pin = PA27 // TX LED
|
||||||
|
LED3 Pin = PB03 // RX LED
|
||||||
|
)
|
||||||
|
|
||||||
// SPI pins - EDBG connected
|
// SPI pins - EDBG connected
|
||||||
const (
|
const (
|
||||||
SPI0_SDO_PIN Pin = PA16 // MOSI: SERCOM1/PAD[0]
|
SPI0_SDO_PIN Pin = PA16 // MOSI: SERCOM1/PAD[0]
|
||||||
|
|
|
@ -8,14 +8,42 @@ import (
|
||||||
"runtime/interrupt"
|
"runtime/interrupt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Pins printed on the silkscreen
|
||||||
const (
|
const (
|
||||||
LED = PC13
|
C13 = PC13
|
||||||
)
|
C14 = PC14
|
||||||
|
C15 = PC15
|
||||||
const (
|
A0 = PA0
|
||||||
// This board does not have a user button, so
|
A1 = PA1
|
||||||
// use first GPIO pin by default
|
A2 = PA2
|
||||||
BUTTON = PA0
|
A3 = PA3
|
||||||
|
A4 = PA4
|
||||||
|
A5 = PA5
|
||||||
|
A6 = PA6
|
||||||
|
A7 = PA7
|
||||||
|
B0 = PB0
|
||||||
|
B1 = PB1
|
||||||
|
B10 = PB10
|
||||||
|
B11 = PB11
|
||||||
|
B12 = PB12
|
||||||
|
B13 = PB13
|
||||||
|
B14 = PB14
|
||||||
|
B15 = PB15
|
||||||
|
A8 = PA8
|
||||||
|
A9 = PA9
|
||||||
|
A10 = PA10
|
||||||
|
A11 = PA11
|
||||||
|
A12 = PA12
|
||||||
|
A13 = PA13
|
||||||
|
A14 = PA14
|
||||||
|
A15 = PA15
|
||||||
|
B3 = PB3
|
||||||
|
B4 = PB4
|
||||||
|
B5 = PB5
|
||||||
|
B6 = PB6
|
||||||
|
B7 = PB7
|
||||||
|
B8 = PB8
|
||||||
|
B9 = PB9
|
||||||
)
|
)
|
||||||
|
|
||||||
// Analog Pins
|
// Analog Pins
|
||||||
|
@ -32,6 +60,14 @@ const (
|
||||||
ADC9 = PB1
|
ADC9 = PB1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// This board does not have a user button, so
|
||||||
|
// use first GPIO pin by default
|
||||||
|
BUTTON = PA0
|
||||||
|
|
||||||
|
LED = PC13
|
||||||
|
)
|
||||||
|
|
||||||
var DefaultUART = UART1
|
var DefaultUART = UART1
|
||||||
|
|
||||||
// UART pins
|
// UART pins
|
||||||
|
|
|
@ -3,36 +3,33 @@
|
||||||
|
|
||||||
package machine
|
package machine
|
||||||
|
|
||||||
// Built-in LED on some ESP32 boards.
|
|
||||||
const LED = IO2
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CLK = GPIO6
|
CLK = GPIO6
|
||||||
CMD = GPIO11
|
CMD = GPIO11
|
||||||
IO0 = GPIO0
|
IO0 = GPIO0
|
||||||
IO1 = GPIO1
|
IO1 = GPIO1
|
||||||
|
IO2 = GPIO2
|
||||||
|
IO3 = GPIO3
|
||||||
|
IO4 = GPIO4
|
||||||
|
IO5 = GPIO5
|
||||||
|
IO9 = GPIO9
|
||||||
IO10 = GPIO10
|
IO10 = GPIO10
|
||||||
IO16 = GPIO16
|
IO16 = GPIO16
|
||||||
IO17 = GPIO17
|
IO17 = GPIO17
|
||||||
IO18 = GPIO18
|
IO18 = GPIO18
|
||||||
IO19 = GPIO19
|
IO19 = GPIO19
|
||||||
IO2 = GPIO2
|
|
||||||
IO21 = GPIO21
|
IO21 = GPIO21
|
||||||
IO22 = GPIO22
|
IO22 = GPIO22
|
||||||
IO23 = GPIO23
|
IO23 = GPIO23
|
||||||
IO25 = GPIO25
|
IO25 = GPIO25
|
||||||
IO26 = GPIO26
|
IO26 = GPIO26
|
||||||
IO27 = GPIO27
|
IO27 = GPIO27
|
||||||
IO3 = GPIO3
|
|
||||||
IO32 = GPIO32
|
IO32 = GPIO32
|
||||||
IO33 = GPIO33
|
IO33 = GPIO33
|
||||||
IO34 = GPIO34
|
IO34 = GPIO34
|
||||||
IO35 = GPIO35
|
IO35 = GPIO35
|
||||||
IO36 = GPIO36
|
IO36 = GPIO36
|
||||||
IO39 = GPIO39
|
IO39 = GPIO39
|
||||||
IO4 = GPIO4
|
|
||||||
IO5 = GPIO5
|
|
||||||
IO9 = GPIO9
|
|
||||||
RXD = GPIO3
|
RXD = GPIO3
|
||||||
SD0 = GPIO7
|
SD0 = GPIO7
|
||||||
SD1 = GPIO8
|
SD1 = GPIO8
|
||||||
|
@ -47,6 +44,9 @@ const (
|
||||||
TXD = GPIO1
|
TXD = GPIO1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Built-in LED on some ESP32 boards.
|
||||||
|
const LED = IO2
|
||||||
|
|
||||||
// SPI pins
|
// SPI pins
|
||||||
const (
|
const (
|
||||||
SPI0_SCK_PIN = IO18
|
SPI0_SCK_PIN = IO18
|
||||||
|
|
|
@ -8,12 +8,8 @@ import (
|
||||||
"runtime/interrupt"
|
"runtime/interrupt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// Onboard crystal oscillator frequency, in MHz.
|
||||||
LED = GPIO13
|
const xoscFreq = 12 // MHz
|
||||||
|
|
||||||
// Onboard crystal oscillator frequency, in MHz.
|
|
||||||
xoscFreq = 12 // MHz
|
|
||||||
)
|
|
||||||
|
|
||||||
// GPIO Pins
|
// GPIO Pins
|
||||||
const (
|
const (
|
||||||
|
@ -37,6 +33,8 @@ const (
|
||||||
A3 = GPIO29
|
A3 = GPIO29
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const LED = GPIO13
|
||||||
|
|
||||||
// I2C Pins.
|
// I2C Pins.
|
||||||
const (
|
const (
|
||||||
I2C0_SDA_PIN = GPIO24
|
I2C0_SDA_PIN = GPIO24
|
||||||
|
|
|
@ -6,14 +6,35 @@ package machine
|
||||||
// The micro:bit does not have a 32kHz crystal on board.
|
// The micro:bit does not have a 32kHz crystal on board.
|
||||||
const HasLowFrequencyCrystal = false
|
const HasLowFrequencyCrystal = false
|
||||||
|
|
||||||
// Buttons on the micro:bit (A and B)
|
var DefaultUART = UART0
|
||||||
|
|
||||||
|
// GPIO/Analog pins
|
||||||
const (
|
const (
|
||||||
BUTTON = BUTTONA
|
P0 = P0_03
|
||||||
BUTTONA = P0_17
|
P1 = P0_02
|
||||||
BUTTONB = P0_26
|
P2 = P0_01
|
||||||
|
P3 = P0_04
|
||||||
|
P4 = P0_05
|
||||||
|
P5 = P0_17
|
||||||
|
P6 = P0_12
|
||||||
|
P7 = P0_11
|
||||||
|
P8 = P0_18
|
||||||
|
P9 = P0_10
|
||||||
|
P10 = P0_06
|
||||||
|
P11 = P0_26
|
||||||
|
P12 = P0_20
|
||||||
|
P13 = P0_23
|
||||||
|
P14 = P0_22
|
||||||
|
P15 = P0_21
|
||||||
|
P16 = P0_16
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultUART = UART0
|
// Buttons on the micro:bit (A and B)
|
||||||
|
const (
|
||||||
|
BUTTONA = P0_17
|
||||||
|
BUTTONB = P0_26
|
||||||
|
BUTTON = BUTTONA
|
||||||
|
)
|
||||||
|
|
||||||
// UART pins
|
// UART pins
|
||||||
const (
|
const (
|
||||||
|
@ -41,27 +62,6 @@ const (
|
||||||
SPI0_SDI_PIN = P0_22 // P14 on the board
|
SPI0_SDI_PIN = P0_22 // P14 on the board
|
||||||
)
|
)
|
||||||
|
|
||||||
// GPIO/Analog pins
|
|
||||||
const (
|
|
||||||
P0 = P0_03
|
|
||||||
P1 = P0_02
|
|
||||||
P2 = P0_01
|
|
||||||
P3 = P0_04
|
|
||||||
P4 = P0_05
|
|
||||||
P5 = P0_17
|
|
||||||
P6 = P0_12
|
|
||||||
P7 = P0_11
|
|
||||||
P8 = P0_18
|
|
||||||
P9 = P0_10
|
|
||||||
P10 = P0_06
|
|
||||||
P11 = P0_26
|
|
||||||
P12 = P0_20
|
|
||||||
P13 = P0_23
|
|
||||||
P14 = P0_22
|
|
||||||
P15 = P0_21
|
|
||||||
P16 = P0_16
|
|
||||||
)
|
|
||||||
|
|
||||||
// LED matrix pins
|
// LED matrix pins
|
||||||
const (
|
const (
|
||||||
LED_COL_1 = P0_04
|
LED_COL_1 = P0_04
|
||||||
|
|
|
@ -7,10 +7,10 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// LEDs on the nrf52840-mdk (nRF52840 dev board)
|
// LEDs on the nrf52840-mdk (nRF52840 dev board)
|
||||||
const (
|
const (
|
||||||
LED Pin = LED_GREEN
|
|
||||||
LED_GREEN Pin = 22
|
LED_GREEN Pin = 22
|
||||||
LED_RED Pin = 23
|
LED_RED Pin = 23
|
||||||
LED_BLUE Pin = 24
|
LED_BLUE Pin = 24
|
||||||
|
LED Pin = LED_GREEN
|
||||||
)
|
)
|
||||||
|
|
||||||
// UART pins
|
// UART pins
|
||||||
|
|
|
@ -8,18 +8,6 @@ import (
|
||||||
"runtime/interrupt"
|
"runtime/interrupt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
LED = LED_BUILTIN
|
|
||||||
LED_BUILTIN = LED_GREEN
|
|
||||||
LED_GREEN = PB3
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// This board does not have a user button, so
|
|
||||||
// use first GPIO pin by default
|
|
||||||
BUTTON = PA0
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Arduino Pins
|
// Arduino Pins
|
||||||
A0 = PA0 // ADC_IN0
|
A0 = PA0 // ADC_IN0
|
||||||
|
@ -45,6 +33,18 @@ const (
|
||||||
D13 = PB3 // SPI1_SCK
|
D13 = PB3 // SPI1_SCK
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
LED = LED_BUILTIN
|
||||||
|
LED_BUILTIN = LED_GREEN
|
||||||
|
LED_GREEN = PB3
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// This board does not have a user button, so
|
||||||
|
// use first GPIO pin by default
|
||||||
|
BUTTON = PA0
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// UART pins
|
// UART pins
|
||||||
// PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP)
|
// PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP)
|
||||||
|
|
|
@ -8,18 +8,6 @@ import (
|
||||||
"runtime/interrupt"
|
"runtime/interrupt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
LED = LED_BUILTIN
|
|
||||||
LED_BUILTIN = LED_GREEN
|
|
||||||
LED_GREEN = PB3
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// This board does not have a user button, so
|
|
||||||
// use first GPIO pin by default
|
|
||||||
BUTTON = PA0
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// Arduino Pins
|
// Arduino Pins
|
||||||
A0 = PA0
|
A0 = PA0
|
||||||
|
@ -47,6 +35,18 @@ const (
|
||||||
D13 = PB3
|
D13 = PB3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
LED = LED_BUILTIN
|
||||||
|
LED_BUILTIN = LED_GREEN
|
||||||
|
LED_GREEN = PB3
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// This board does not have a user button, so
|
||||||
|
// use first GPIO pin by default
|
||||||
|
BUTTON = PA0
|
||||||
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// UART pins
|
// UART pins
|
||||||
// PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP)
|
// PA2 and PA15 are connected to the ST-Link Virtual Com Port (VCP)
|
||||||
|
|
|
@ -9,11 +9,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LED = LED_BUILTIN
|
|
||||||
LED_BUILTIN = LED_GREEN
|
|
||||||
LED_GREEN = PC7
|
LED_GREEN = PC7
|
||||||
LED_BLUE = PB7
|
LED_BLUE = PB7
|
||||||
LED_RED = PA9
|
LED_RED = PA9
|
||||||
|
LED_BUILTIN = LED_GREEN
|
||||||
|
LED = LED_BUILTIN
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -8,14 +8,6 @@ const HasLowFrequencyCrystal = true
|
||||||
// More info: https://docs.particle.io/datasheets/wi-fi/argon-datasheet/
|
// More info: https://docs.particle.io/datasheets/wi-fi/argon-datasheet/
|
||||||
// Board diagram: https://docs.particle.io/assets/images/argon/argon-block-diagram.png
|
// Board diagram: https://docs.particle.io/assets/images/argon/argon-block-diagram.png
|
||||||
|
|
||||||
// LEDs
|
|
||||||
const (
|
|
||||||
LED Pin = 44
|
|
||||||
LED_GREEN Pin = 14
|
|
||||||
LED_RED Pin = 13
|
|
||||||
LED_BLUE Pin = 15
|
|
||||||
)
|
|
||||||
|
|
||||||
// GPIOs
|
// GPIOs
|
||||||
const (
|
const (
|
||||||
A0 Pin = 3
|
A0 Pin = 3
|
||||||
|
@ -40,6 +32,14 @@ const (
|
||||||
D13 Pin = 47 // Also SCK
|
D13 Pin = 47 // Also SCK
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LEDs
|
||||||
|
const (
|
||||||
|
LED Pin = 44
|
||||||
|
LED_GREEN Pin = 14
|
||||||
|
LED_RED Pin = 13
|
||||||
|
LED_BLUE Pin = 15
|
||||||
|
)
|
||||||
|
|
||||||
// UART
|
// UART
|
||||||
var (
|
var (
|
||||||
DefaultUART = UART0
|
DefaultUART = UART0
|
||||||
|
|
|
@ -8,14 +8,6 @@ const HasLowFrequencyCrystal = true
|
||||||
// More info: https://docs.particle.io/datasheets/cellular/boron-datasheet/
|
// More info: https://docs.particle.io/datasheets/cellular/boron-datasheet/
|
||||||
// Board diagram: https://docs.particle.io/assets/images/boron/boron-block-diagram.png
|
// Board diagram: https://docs.particle.io/assets/images/boron/boron-block-diagram.png
|
||||||
|
|
||||||
// LEDs
|
|
||||||
const (
|
|
||||||
LED Pin = 44
|
|
||||||
LED_GREEN Pin = 14
|
|
||||||
LED_RED Pin = 13
|
|
||||||
LED_BLUE Pin = 15
|
|
||||||
)
|
|
||||||
|
|
||||||
// GPIOs
|
// GPIOs
|
||||||
const (
|
const (
|
||||||
A0 Pin = 3
|
A0 Pin = 3
|
||||||
|
@ -40,6 +32,14 @@ const (
|
||||||
D13 Pin = 47 // Also SCK
|
D13 Pin = 47 // Also SCK
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LEDs
|
||||||
|
const (
|
||||||
|
LED Pin = 44
|
||||||
|
LED_GREEN Pin = 14
|
||||||
|
LED_RED Pin = 13
|
||||||
|
LED_BLUE Pin = 15
|
||||||
|
)
|
||||||
|
|
||||||
// UART
|
// UART
|
||||||
var (
|
var (
|
||||||
DefaultUART = UART0
|
DefaultUART = UART0
|
||||||
|
|
|
@ -8,14 +8,6 @@ const HasLowFrequencyCrystal = true
|
||||||
// More info: https://docs.particle.io/datasheets/discontinued/xenon-datasheet/
|
// More info: https://docs.particle.io/datasheets/discontinued/xenon-datasheet/
|
||||||
// Board diagram: https://docs.particle.io/assets/images/xenon/xenon-block-diagram.png
|
// Board diagram: https://docs.particle.io/assets/images/xenon/xenon-block-diagram.png
|
||||||
|
|
||||||
// LEDs
|
|
||||||
const (
|
|
||||||
LED Pin = 44
|
|
||||||
LED_GREEN Pin = 14
|
|
||||||
LED_RED Pin = 13
|
|
||||||
LED_BLUE Pin = 15
|
|
||||||
)
|
|
||||||
|
|
||||||
// GPIOs
|
// GPIOs
|
||||||
const (
|
const (
|
||||||
A0 Pin = 3
|
A0 Pin = 3
|
||||||
|
@ -40,6 +32,14 @@ const (
|
||||||
D13 Pin = 47 // Also SCK
|
D13 Pin = 47 // Also SCK
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LEDs
|
||||||
|
const (
|
||||||
|
LED Pin = 44
|
||||||
|
LED_GREEN Pin = 14
|
||||||
|
LED_RED Pin = 13
|
||||||
|
LED_BLUE Pin = 15
|
||||||
|
)
|
||||||
|
|
||||||
// UART
|
// UART
|
||||||
var (
|
var (
|
||||||
DefaultUART = UART0
|
DefaultUART = UART0
|
||||||
|
|
|
@ -11,13 +11,13 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// LED on the pca10031
|
// LED on the pca10031
|
||||||
const (
|
const (
|
||||||
LED = LED_RED
|
|
||||||
LED1 = LED_RED
|
LED1 = LED_RED
|
||||||
LED2 = LED_GREEN
|
LED2 = LED_GREEN
|
||||||
LED3 = LED_BLUE
|
LED3 = LED_BLUE
|
||||||
LED_RED = P0_21
|
LED_RED = P0_21
|
||||||
LED_GREEN = P0_22
|
LED_GREEN = P0_22
|
||||||
LED_BLUE = P0_23
|
LED_BLUE = P0_23
|
||||||
|
LED = LED_RED
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultUART = UART0
|
var DefaultUART = UART0
|
||||||
|
|
|
@ -8,20 +8,20 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// LEDs on the PCA10040 (nRF52832 dev board)
|
// LEDs on the PCA10040 (nRF52832 dev board)
|
||||||
const (
|
const (
|
||||||
LED Pin = LED1
|
|
||||||
LED1 Pin = 17
|
LED1 Pin = 17
|
||||||
LED2 Pin = 18
|
LED2 Pin = 18
|
||||||
LED3 Pin = 19
|
LED3 Pin = 19
|
||||||
LED4 Pin = 20
|
LED4 Pin = 20
|
||||||
|
LED Pin = LED1
|
||||||
)
|
)
|
||||||
|
|
||||||
// Buttons on the PCA10040 (nRF52832 dev board)
|
// Buttons on the PCA10040 (nRF52832 dev board)
|
||||||
const (
|
const (
|
||||||
BUTTON Pin = BUTTON1
|
|
||||||
BUTTON1 Pin = 13
|
BUTTON1 Pin = 13
|
||||||
BUTTON2 Pin = 14
|
BUTTON2 Pin = 14
|
||||||
BUTTON3 Pin = 15
|
BUTTON3 Pin = 15
|
||||||
BUTTON4 Pin = 16
|
BUTTON4 Pin = 16
|
||||||
|
BUTTON Pin = BUTTON1
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultUART = UART0
|
var DefaultUART = UART0
|
||||||
|
|
|
@ -7,20 +7,20 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// LEDs on the pca10056
|
// LEDs on the pca10056
|
||||||
const (
|
const (
|
||||||
LED Pin = LED1
|
|
||||||
LED1 Pin = 13
|
LED1 Pin = 13
|
||||||
LED2 Pin = 14
|
LED2 Pin = 14
|
||||||
LED3 Pin = 15
|
LED3 Pin = 15
|
||||||
LED4 Pin = 16
|
LED4 Pin = 16
|
||||||
|
LED Pin = LED1
|
||||||
)
|
)
|
||||||
|
|
||||||
// Buttons on the pca10056
|
// Buttons on the pca10056
|
||||||
const (
|
const (
|
||||||
BUTTON Pin = BUTTON1
|
|
||||||
BUTTON1 Pin = 11
|
BUTTON1 Pin = 11
|
||||||
BUTTON2 Pin = 12
|
BUTTON2 Pin = 12
|
||||||
BUTTON3 Pin = 24
|
BUTTON3 Pin = 24
|
||||||
BUTTON4 Pin = 25
|
BUTTON4 Pin = 25
|
||||||
|
BUTTON Pin = BUTTON1
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultUART = UART0
|
var DefaultUART = UART0
|
||||||
|
|
|
@ -8,17 +8,17 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// LEDs on the PCA10059 (nRF52840 dongle)
|
// LEDs on the PCA10059 (nRF52840 dongle)
|
||||||
const (
|
const (
|
||||||
LED Pin = LED1
|
|
||||||
LED1 Pin = 6
|
LED1 Pin = 6
|
||||||
LED2 Pin = 8
|
LED2 Pin = 8
|
||||||
LED3 Pin = (1 << 5) | 9
|
LED3 Pin = (1 << 5) | 9
|
||||||
LED4 Pin = 12
|
LED4 Pin = 12
|
||||||
|
LED Pin = LED1
|
||||||
)
|
)
|
||||||
|
|
||||||
// Buttons on the PCA10059 (nRF52840 dongle)
|
// Buttons on the PCA10059 (nRF52840 dongle)
|
||||||
const (
|
const (
|
||||||
BUTTON Pin = BUTTON1
|
|
||||||
BUTTON1 Pin = (1 << 5) | 6
|
BUTTON1 Pin = (1 << 5) | 6
|
||||||
|
BUTTON Pin = BUTTON1
|
||||||
)
|
)
|
||||||
|
|
||||||
// ADC pins
|
// ADC pins
|
||||||
|
|
|
@ -12,10 +12,10 @@ const HasLowFrequencyCrystal = true
|
||||||
// LEDs simply expose the three brightness level LEDs on the PineTime. They can
|
// LEDs simply expose the three brightness level LEDs on the PineTime. They can
|
||||||
// be useful for simple "hello world" style programs.
|
// be useful for simple "hello world" style programs.
|
||||||
const (
|
const (
|
||||||
LED = LED1
|
|
||||||
LED1 = LCD_BACKLIGHT_HIGH
|
LED1 = LCD_BACKLIGHT_HIGH
|
||||||
LED2 = LCD_BACKLIGHT_MID
|
LED2 = LCD_BACKLIGHT_MID
|
||||||
LED3 = LCD_BACKLIGHT_LOW
|
LED3 = LCD_BACKLIGHT_LOW
|
||||||
|
LED = LED1
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultUART = UART0
|
var DefaultUART = UART0
|
||||||
|
|
|
@ -7,15 +7,15 @@ const HasLowFrequencyCrystal = true
|
||||||
|
|
||||||
// Pins on the reel board
|
// Pins on the reel board
|
||||||
const (
|
const (
|
||||||
LED Pin = LED1
|
|
||||||
LED1 Pin = LED_YELLOW
|
|
||||||
LED2 Pin = LED_RED
|
|
||||||
LED3 Pin = LED_GREEN
|
|
||||||
LED4 Pin = LED_BLUE
|
|
||||||
LED_RED Pin = 11
|
LED_RED Pin = 11
|
||||||
LED_GREEN Pin = 12
|
LED_GREEN Pin = 12
|
||||||
LED_BLUE Pin = 41
|
LED_BLUE Pin = 41
|
||||||
LED_YELLOW Pin = 13
|
LED_YELLOW Pin = 13
|
||||||
|
LED1 Pin = LED_YELLOW
|
||||||
|
LED2 Pin = LED_RED
|
||||||
|
LED3 Pin = LED_GREEN
|
||||||
|
LED4 Pin = LED_BLUE
|
||||||
|
LED Pin = LED1
|
||||||
EPD_BUSY_PIN Pin = 14
|
EPD_BUSY_PIN Pin = 14
|
||||||
EPD_RESET_PIN Pin = 15
|
EPD_RESET_PIN Pin = 15
|
||||||
EPD_DC_PIN Pin = 16
|
EPD_DC_PIN Pin = 16
|
||||||
|
|
|
@ -9,16 +9,16 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LED = LED_BUILTIN
|
|
||||||
LED1 = LED_GREEN
|
LED1 = LED_GREEN
|
||||||
LED2 = LED_ORANGE
|
LED2 = LED_ORANGE
|
||||||
LED3 = LED_RED
|
LED3 = LED_RED
|
||||||
LED4 = LED_BLUE
|
LED4 = LED_BLUE
|
||||||
LED_BUILTIN = LED_GREEN
|
|
||||||
LED_GREEN = PD12
|
LED_GREEN = PD12
|
||||||
LED_ORANGE = PD13
|
LED_ORANGE = PD13
|
||||||
LED_RED = PD14
|
LED_RED = PD14
|
||||||
LED_BLUE = PD15
|
LED_BLUE = PD15
|
||||||
|
LED = LED_BUILTIN
|
||||||
|
LED_BUILTIN = LED_GREEN
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,9 +9,6 @@ func CPUFrequency() uint32 { return 180000000 }
|
||||||
// ClockFrequency returns the frequency of the external oscillator (16MHz)
|
// ClockFrequency returns the frequency of the external oscillator (16MHz)
|
||||||
func ClockFrequency() uint32 { return 16000000 }
|
func ClockFrequency() uint32 { return 16000000 }
|
||||||
|
|
||||||
// LED on the Teensy
|
|
||||||
const LED = PC05
|
|
||||||
|
|
||||||
// digital IO
|
// digital IO
|
||||||
const (
|
const (
|
||||||
D00 = PB16
|
D00 = PB16
|
||||||
|
@ -80,6 +77,9 @@ const (
|
||||||
D63 = PE05
|
D63 = PE05
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// LED on the Teensy
|
||||||
|
const LED = PC05
|
||||||
|
|
||||||
var (
|
var (
|
||||||
TeensyUART1 = UART0
|
TeensyUART1 = UART0
|
||||||
TeensyUART2 = UART1
|
TeensyUART2 = UART1
|
||||||
|
|
|
@ -8,12 +8,8 @@ import (
|
||||||
"runtime/interrupt"
|
"runtime/interrupt"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// Onboard crystal oscillator frequency, in MHz.
|
||||||
LED = GPIO25
|
const xoscFreq = 12 // MHz
|
||||||
|
|
||||||
// Onboard crystal oscillator frequency, in MHz.
|
|
||||||
xoscFreq = 12 // MHz
|
|
||||||
)
|
|
||||||
|
|
||||||
// GPIO Pins
|
// GPIO Pins
|
||||||
const (
|
const (
|
||||||
|
@ -56,6 +52,8 @@ const (
|
||||||
A3 = GPIO29
|
A3 = GPIO29
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const LED = GPIO25
|
||||||
|
|
||||||
// I2C Pins.
|
// I2C Pins.
|
||||||
const (
|
const (
|
||||||
I2C0_SCL_PIN = GPIO6 // N/A
|
I2C0_SCL_PIN = GPIO6 // N/A
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче