-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathvariant.h
More file actions
83 lines (57 loc) · 2.18 KB
/
Copy pathvariant.h
File metadata and controls
83 lines (57 loc) · 2.18 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
/*
* variant.h
* Copyright (C) 2023 Seeed K.K.
* MIT License
*/
#pragma once
#include "WVariant.h"
////////////////////////////////////////////////////////////////////////////////
// Low frequency clock source
#define VARIANT_MCK (64000000ul)
//#define USE_LFXO // 32.768 kHz crystal oscillator
#define USE_LFRC // 32.768 kHz RC oscillator
////////////////////////////////////////////////////////////////////////////////
// Power
#define PIN_EXT_VCC (21)
#define EXT_VCC (PIN_EXT_VCC)
#define PIN_VBAT_READ (17)
#define ADC_RESOLUTION (14)
#define AREF_VOLTAGE (3.6f) // Using default analog reference (AR_INTERNAL), which maps ADC reading to 0 ... 3.6V
////////////////////////////////////////////////////////////////////////////////
// Number of pins
#define PINS_COUNT (23)
#define NUM_DIGITAL_PINS (23)
#define NUM_ANALOG_INPUTS (3)
#define NUM_ANALOG_OUTPUTS (0)
////////////////////////////////////////////////////////////////////////////////
// UART pin definition
#define PIN_SERIAL1_TX (1)
#define PIN_SERIAL1_RX (0)
////////////////////////////////////////////////////////////////////////////////
// I2C pin definition
#define WIRE_INTERFACES_COUNT 2
#define PIN_WIRE_SDA (6)
#define PIN_WIRE_SCL (7)
#define PIN_WIRE1_SDA (13)
#define PIN_WIRE1_SCL (14)
////////////////////////////////////////////////////////////////////////////////
// SPI pin definition
#define SPI_INTERFACES_COUNT 2
#define PIN_SPI_SCK (2)
#define PIN_SPI_MISO (3)
#define PIN_SPI_MOSI (4)
#define PIN_SPI_NSS (5)
#define PIN_SPI1_SCK (18)
#define PIN_SPI1_MISO (19)
#define PIN_SPI1_MOSI (20)
////////////////////////////////////////////////////////////////////////////////
// Builtin LEDs
#define PIN_LED (22)
#define LED_PIN PIN_LED
#define LED_BLUE PIN_LED
#define LED_BUILTIN PIN_LED
#define LED_STATE_ON 1
////////////////////////////////////////////////////////////////////////////////
// Builtin buttons
#define PIN_BUTTON1 (6)
#define BUTTON_PIN PIN_BUTTON1