-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
57 lines (50 loc) · 1.2 KB
/
config.h
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
#ifndef CONFIG_H
#define CONFIG_H
#define UART_ID uart0
#define BAUD_RATE 115200
#define UART_TX_PIN 0
#define UART_RX_PIN 1
//Ethernet Connections
// Orange Strip is the GND connection.
#define ORANGE_ETHERNET_PIN 2
#define GREEN_STRIPE_ETHERNET_PIN 3
#define BLUE_ETHERNET_PIN 4
#define BLUE_STRIPE_ETHERNET_PIN 5
#define GREEN_ETHERNET_PIN 6
#define BROWN_STRIPE_ETHERNET_PIN 7
// Brown is the +V connection.
#define SPI_PORT 1
#define SPI_BAUDRATE
#define SPI1_RX_MISO 8
// 9 is not used.
#define SPI1_SCK 10
#define SPI1_TX_MOSI 11
#define DATA_COMMAND 12
#define OLED_RESET 13
#define OCS 14
// 15 is not used.
// I2C config (incoming data)
#define I2C_SLAVE_ADDR 0xCE
#define I2C_BAUDRATE 100000
#define I2C_SLAVE_SDA_PIN 16
#define I2C_SLAVE_SCL_PIN 17
#ifndef GPCOMMS_BUFFER_SIZE
#define GPCOMMS_BUFFER_SIZE 100
#endif
// SDIO config
// D1-3 are offsets from D0, and need to be consecutive pins
#define CLK_GPIO 18
#define CMD_GPIO 19
#define D0_GPIO 20
#define D1_GPIO 21
#define D2_GPIO 22
#define D3_GPIO 23
#define CD_GPIO 24
// 25 is not used.
// I2C config (as a host)
#define I2C_BAUDRATE 100000
#define SDA_1_PIN 26
#define SCL_1_PIN 27
// ADC is not used
// 28 and 29 are not used.
#endif // CONFIG_H