-
-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathgeneric-rtl8710bx-4mb-980k.h
More file actions
156 lines (146 loc) · 4.86 KB
/
Copy pathgeneric-rtl8710bx-4mb-980k.h
File metadata and controls
156 lines (146 loc) · 4.86 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/* This file was auto-generated from generic-rtl8710bx-4mb-980k.json using boardgen */
#pragma once
// clang-format off
// Pins
// ----
#define PINS_COUNT 17 // Total GPIO count
#define NUM_DIGITAL_PINS 17 // Digital inputs/outputs
#define NUM_ANALOG_INPUTS 1 // ADC inputs
#define NUM_ANALOG_OUTPUTS 9 // PWM & DAC outputs
#define PINS_GPIO_MAX 30 // Last usable GPIO number
// SPI Interfaces
// --------------
#define PIN_SPI0_CS 19u // PA_19
#define PIN_SPI0_MISO 22u // PA_22
#define PIN_SPI0_MOSI 23u // PA_23
#define PIN_SPI0_SCK 18u // PA_18
#define PIN_SPI1_CS 19u // PA_19
#define PIN_SPI1_MISO 22u // PA_22
#define PIN_SPI1_MOSI 23u // PA_23
#define PIN_SPI1_SCK 18u // PA_18
#define PINS_SPI0_CS (pin_size_t[]){19u}
#define PINS_SPI0_MISO (pin_size_t[]){22u}
#define PINS_SPI0_MOSI (pin_size_t[]){23u}
#define PINS_SPI0_SCK (pin_size_t[]){18u}
#define PINS_SPI1_CS (pin_size_t[]){19u}
#define PINS_SPI1_MISO (pin_size_t[]){22u}
#define PINS_SPI1_MOSI (pin_size_t[]){23u}
#define PINS_SPI1_SCK (pin_size_t[]){18u}
// Wire Interfaces
// ---------------
#define PIN_WIRE0_SCL_0 22u // PA_22
#define PIN_WIRE0_SCL_1 29u // PA_29
#define PIN_WIRE0_SDA_0 19u // PA_19
#define PIN_WIRE0_SDA_1 30u // PA_30
#define PIN_WIRE1_SCL 18u // PA_18
#define PIN_WIRE1_SDA 23u // PA_23
#define PINS_WIRE0_SCL (pin_size_t[]){22u, 29u}
#define PINS_WIRE0_SDA (pin_size_t[]){19u, 30u}
#define PINS_WIRE1_SCL (pin_size_t[]){18u}
#define PINS_WIRE1_SDA (pin_size_t[]){23u}
// Serial ports
// ------------
#define PIN_SERIAL0_CTS 19u // PA_19
#define PIN_SERIAL0_RTS 22u // PA_22
#define PIN_SERIAL0_RX 18u // PA_18
#define PIN_SERIAL0_TX 23u // PA_23
#define PIN_SERIAL2_RX 29u // PA_29
#define PIN_SERIAL2_TX 30u // PA_30
#define PINS_SERIAL0_CTS (pin_size_t[]){19u}
#define PINS_SERIAL0_RTS (pin_size_t[]){22u}
#define PINS_SERIAL0_RX (pin_size_t[]){18u}
#define PINS_SERIAL0_TX (pin_size_t[]){23u}
#define PINS_SERIAL2_RX (pin_size_t[]){29u}
#define PINS_SERIAL2_TX (pin_size_t[]){30u}
// Pin function macros
// -------------------
#define PIN_ADC1 19u // PA_19
#define PIN_CS0 19u // PA_19
#define PIN_CS1 19u // PA_19
#define PIN_CTS0 19u // PA_19
#define PIN_MISO0 22u // PA_22
#define PIN_MISO1 22u // PA_22
#define PIN_MOSI0 23u // PA_23
#define PIN_MOSI1 23u // PA_23
#define PIN_PA00 0u // PA_0
#define PIN_PA05 5u // PA_5
#define PIN_PA06 6u // PA_6
#define PIN_PA07 7u // PA_7
#define PIN_PA08 8u // PA_8
#define PIN_PA09 9u // PA_9
#define PIN_PA10 10u // PA_10
#define PIN_PA11 11u // PA_11
#define PIN_PA12 12u // PA_12
#define PIN_PA14 14u // PA_14
#define PIN_PA15 15u // PA_15
#define PIN_PA18 18u // PA_18
#define PIN_PA19 19u // PA_19
#define PIN_PA22 22u // PA_22
#define PIN_PA23 23u // PA_23
#define PIN_PA29 29u // PA_29
#define PIN_PA30 30u // PA_30
#define PIN_PWM1 15u // PA_15
#define PIN_PWM2 0u // PA_0
#define PIN_PWM3 12u // PA_12
#define PIN_PWM4 30u // PA_30
#define PIN_PWM5 22u // PA_22
#define PIN_RTS0 22u // PA_22
#define PIN_RX0 18u // PA_18
#define PIN_RX2 29u // PA_29
#define PIN_SCK0 18u // PA_18
#define PIN_SCK1 18u // PA_18
#define PIN_SCL1 18u // PA_18
#define PIN_SDA1 23u // PA_23
#define PIN_TX0 23u // PA_23
#define PIN_TX2 30u // PA_30
// Port availability
// -----------------
#define HAS_SERIAL0 1
#define HAS_SERIAL2 1
#define HAS_SPI0 1
#define HAS_SPI1 1
#define HAS_WIRE0 1
#define HAS_WIRE1 1
#define SERIAL_INTERFACES_COUNT 2
#define SPI_INTERFACES_COUNT 2
#define WIRE_INTERFACES_COUNT 2
// Arduino pin names
// -----------------
#define PIN_D0 0u // PA_0
#define PIN_D1 5u // PA_5
#define PIN_D2 6u // PA_6
#define PIN_D3 7u // PA_7
#define PIN_D4 8u // PA_8
#define PIN_D5 9u // PA_9
#define PIN_D6 10u // PA_10
#define PIN_D7 11u // PA_11
#define PIN_D8 12u // PA_12
#define PIN_D9 14u // PA_14
#define PIN_D10 15u // PA_15
#define PIN_D11 18u // PA_18
#define PIN_D12 19u // PA_19
#define PIN_D13 22u // PA_22
#define PIN_D14 23u // PA_23
#define PIN_D15 29u // PA_29
#define PIN_D16 30u // PA_30
#define PIN_A0 19u // PA_19
// Static pin names
// ----------------
static const unsigned char A0 = PIN_A0;
static const unsigned char D0 = PIN_D0;
static const unsigned char D1 = PIN_D1;
static const unsigned char D2 = PIN_D2;
static const unsigned char D3 = PIN_D3;
static const unsigned char D4 = PIN_D4;
static const unsigned char D5 = PIN_D5;
static const unsigned char D6 = PIN_D6;
static const unsigned char D7 = PIN_D7;
static const unsigned char D8 = PIN_D8;
static const unsigned char D9 = PIN_D9;
static const unsigned char D10 = PIN_D10;
static const unsigned char D11 = PIN_D11;
static const unsigned char D12 = PIN_D12;
static const unsigned char D13 = PIN_D13;
static const unsigned char D14 = PIN_D14;
static const unsigned char D15 = PIN_D15;
static const unsigned char D16 = PIN_D16;