-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMotor.h
32 lines (28 loc) · 1.03 KB
/
Motor.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
/******************************************************************************
***************************Intermediate driver layer***************************
* | file : Motor.h
* | version : V1.0
* | date : 2017-12-14
* | function : 28BYJ-48 Stepper motor Drive function
******************************************************************************/
#ifndef __MOTOR_H
#define __MOTOR_H
#include "DEV_Config.h"
//define two device
#define MOTOR_DEV_1 1
#define MOTOR_DEV_2 2
struct MOTOR{
BYTE L1; //Orange line
BYTE L2; //Yellow line
BYTE L3; //Powder line
BYTE L4; //Blue line
};
/********************************************************************************
function:
Macro definition variable name
********************************************************************************/
void Motor_Init(BYTE Motor1, BYTE Motor2);
void Motor_Init0(BYTE Motor1, BYTE Motor2);
void Motor_Trun(BYTE Motor, unsigned long Angle);
void Motor_Trun0(BYTE Motor, unsigned long Angle);
#endif