-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDEV_Config.h
More file actions
53 lines (44 loc) · 1.47 KB
/
DEV_Config.h
File metadata and controls
53 lines (44 loc) · 1.47 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
/******************************************************************************
**************************Hardware interface layer*****************************
* | file : DEV_Config.h
* | version : V1.0
* | date : 2017-12-14
* | function :
Provide the hardware underlying interface
******************************************************************************/
#ifndef _DEV_CONFIG_H_
#define _DEV_CONFIG_H_
#include <Arduino.h>
#define BYTE uint8_t
#define WORD uint16_t
#define DEV_DEBUG 0
#if DEV_DEBUG
#define DEBUG(__info) Serial.print(__info)
#else
#define DEBUG(__info)
#endif
/****************************************************************************************
//Use the library function definition
*****************************************************************************************/
//GPIO config
#define MOTOR1_A 2
#define MOTOR1_B 3
#define MOTOR1_EN 6
#define MOTOR2_A 4
#define MOTOR2_B 5
#define MOTOR2_EN 9
#define MOTOR3_A 7
#define MOTOR3_B 8
#define MOTOR3_EN 10
#define MOTOR4_A 12
#define MOTOR4_B 13
#define MOTOR4_EN 11
#define SET_PIN(__PIN, __VOL) digitalWrite(__PIN, __VOL)
/*------------------------------------------------------------------------------------------------------*/
uint8_t System_Init(void);
void System_Exit(void);
void DEV1_Init(void);
void DEV2_Init(void);
void Driver_Delay_ms(unsigned long xms);
void Driver_Delay_us(int xus);
#endif