machine: refactor pins to be of Pin type

This commit is contained in:
Ayke van Laethem
2019-04-28 18:49:17 +02:00
committed by Ron Evans
parent 421ef04efb
commit 94b8214529
38 changed files with 590 additions and 605 deletions
+23 -23
View File
@@ -7,47 +7,47 @@ const HasLowFrequencyCrystal = true
// LEDs on the PCA10040 (nRF52832 dev board)
const (
LED = LED1
LED1 = 17
LED2 = 18
LED3 = 19
LED4 = 20
LED Pin = LED1
LED1 Pin = 17
LED2 Pin = 18
LED3 Pin = 19
LED4 Pin = 20
)
// Buttons on the PCA10040 (nRF52832 dev board)
const (
BUTTON = BUTTON1
BUTTON1 = 13
BUTTON2 = 14
BUTTON3 = 15
BUTTON4 = 16
BUTTON Pin = BUTTON1
BUTTON1 Pin = 13
BUTTON2 Pin = 14
BUTTON3 Pin = 15
BUTTON4 Pin = 16
)
// UART pins for NRF52840-DK
const (
UART_TX_PIN = 6
UART_RX_PIN = 8
UART_TX_PIN Pin = 6
UART_RX_PIN Pin = 8
)
// ADC pins
const (
ADC0 = 3
ADC1 = 4
ADC2 = 28
ADC3 = 29
ADC4 = 30
ADC5 = 31
ADC0 Pin = 3
ADC1 Pin = 4
ADC2 Pin = 28
ADC3 Pin = 29
ADC4 Pin = 30
ADC5 Pin = 31
)
// I2C pins
const (
SDA_PIN = 26
SCL_PIN = 27
SDA_PIN Pin = 26
SCL_PIN Pin = 27
)
// SPI pins
const (
SPI0_SCK_PIN = 25
SPI0_MOSI_PIN = 23
SPI0_MISO_PIN = 24
SPI0_SCK_PIN Pin = 25
SPI0_MOSI_PIN Pin = 23
SPI0_MISO_PIN Pin = 24
)