SRA Board Components
ESP-IDF component for SRA Board
include
pin_defs.h
Go to the documentation of this file.
1
/*
2
* MIT License
3
*
4
* Copyright (c) 2021 Society of Robotics and Automation
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to deal
8
* in the Software without restriction, including without limitation the rights
9
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
* copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in all
14
* copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
* SOFTWARE.
23
*/
24
25
#ifndef PIN_DEFS_H
26
#define PIN_DEFS_H
27
28
#define CHECK(x) \
29
do \
30
{ \
31
esp_err_t __; \
32
if ((__ = x) != ESP_OK) \
33
return __; \
34
} while (0)
35
#define CHECK_LOGE(err, x, tag, msg, ...) \
36
do \
37
{ \
38
if ((err = x) != ESP_OK) \
39
{ \
40
ESP_LOGE(tag, msg, ##__VA_ARGS__); \
41
return err; \
42
} \
43
} while (0)
44
46
#define MPU6050_INT 23
47
#define MPU6050_SDA 22
48
#define MPU6050_SCL 21
49
51
52
#ifdef CONFIG_ENABLE_OLED
54
#define OLED_SDA 22
55
#define OLED_SCL 21
56
#endif
57
59
#define BG_LED_1 12
60
#define BG_LED_2 13
61
#define BG_LED_3 25
62
#define BG_LED_4 26
63
#define BG_LED_5 15
64
#define BG_LED_6 5
65
#define BG_LED_7 18
66
#define BG_LED_8 19
68
70
#define SWITCH_1 4
71
#define SWITCH_2 2
72
#define SWITCH_3 27
73
#define SWITCH_4 14
75
77
#define LSA_A0 32
78
#define LSA_A1 35
79
#define LSA_A2 34
80
#define LSA_A3 39
81
#define LSA_A4 36
82
//******* battery ********//
83
#define BATTERY 33
85
87
//****** normal mode ******//
88
#define MDA_NORMAL_IN_1 12
//MCPWM_UNIT_1 MCPWM0A
89
#define MDA_NORMAL_IN_2 13
//MCPWM_UNIT_1 MCPWM0B
90
#define MDA_NORMAL_IN_3 25
//MCPWM_UNIT_1 MCPWM1A
91
#define MDA_NORMAL_IN_4 26
//MCPWM_UNIT_1 MCPWM1B
92
93
//***** parallel mode *****//
94
#define MDA_PARALLEL_IN_1_2 25
//MCPWM_UNIT_1 MCPWM0A
95
#define MDA_PARALLEL_IN_3_4 26
//MCPWM_UNIT_1 MCPWM0B
97
99
#define SERVO_A 15
100
#define SERVO_B 5
101
#define SERVO_C 19
102
#define SERVO_D 18
104
105
#endif
Generated by
1.9.2