-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathRak3172_Canopus.h
63 lines (55 loc) · 1011 Bytes
/
Rak3172_Canopus.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
58
59
60
61
62
63
#ifndef RAK3172_CANOPUS_H
#define RAK3172_CANOPUS_H
#endif
#define V3_4
#ifdef RAK3172_CANOPUS_H
/* COMMON */
#define LED_RECV PB2 //LED_BLUE
#define LED_SEND PA8 //LED_YELLOW
#define I2C_SDA PA11
#define I2C_SCL PA12
#define Volt_PIN PB4
/* V1 */
#ifdef V1
#define LED_SYNC PA0 //LED_RED
#define mA_PIN PB3
#define V_SS3 PB5
#define V_SS5 PB12
#endif
/* V2 */
#ifdef V2
#define LED_SYNC PA10 //LED_RED
#define mA_PIN PB3
#define V_SS3 PB5
#define V_SS5 PA1
#endif
/* V3 */
#ifdef V3
#define LED_SYNC PA9 //LED_RED
#define AI2_PIN PA10
#define AI1_PIN PA15
#define V_SS3 PB5
#define V_SS5 PA1
#define ABAT PB3
#endif
/* V3_4 */
#ifdef V3_4
#define LED_SYNC PA9 //LED_RED
#define AI2_PIN PA10
#define AI1_PIN PA15
#define V_SS3 PB5
#define V_SS5 PA1
#define V_SS12 PA0
#define ABAT PB3
#endif
void init_io();
void enable_Vrs485();
void enable_Vss3();
void enable_Vss5();
void enable_Vss12();
void disable_Vrs485();
void disable_Vss3();
void disable_Vss5();
void disable_Vss12();
void save_power();
#endif