aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/board_qtpy_esp32c3.go
blob: a2e3f48e8cdc3fb61e4ff6576d5fb1c14a9ed61a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//go:build qtpy_esp32c3

// This file contains the pin mappings for the Adafruit QtPy ESP32C3 boards.
//
// https://learn.adafruit.com/adafruit-qt-py-esp32-c3-wifi-dev-board/pinouts
package machine

// Digital Pins
const (
	D0 = GPIO4
	D1 = GPIO3
	D2 = GPIO1
	D3 = GPIO0
)

// Analog pins (ADC1)
const (
	A0 = GPIO4
	A1 = GPIO3
	A2 = GPIO1
	A3 = GPIO0
)

// UART pins
const (
	RX_PIN = GPIO20
	TX_PIN = GPIO21

	UART_RX_PIN = RX_PIN
	UART_TX_PIN = TX_PIN
)

// I2C pins
const (
	SDA_PIN = GPIO5
	SCL_PIN = GPIO6

	I2C0_SDA_PIN = SDA_PIN
	I2C0_SCL_PIN = SCL_PIN
)

// SPI pins
const (
	SCK_PIN = GPIO10
	MI_PIN  = GPIO8
	MO_PIN  = GPIO7

	SPI_SCK_PIN = SCK_PIN
	SPI_SDI_PIN = MI_PIN
	SPI_SDO_PIN = MO_PIN
)

const (
	NEOPIXEL = GPIO2
	WS2812   = GPIO2

	// also used for boot button.
	// set it to be an input-with-pullup
	BUTTON = GPIO9
)