-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathio_cfg.h
53 lines (44 loc) · 1.68 KB
/
io_cfg.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
/*********************************************************************
*
*********************************************************************
* FileName: io_cfg.h
********************************************************************/
#ifndef IO_CFG_H
#define IO_CFG_H
/** I N C L U D E S *************************************************/
#include "typedefs.h"
#define RX_ROLL REGISTER_BIT(PIND,1)
#define RX_PITCH REGISTER_BIT(PIND,2) // INT0
#define RX_COLL REGISTER_BIT(PIND,3) // INT1
#define RX_YAW REGISTER_BIT(PINB,7)
#define RX_ROLL_DIR REGISTER_BIT(DDRD,1)
#define RX_PITCH_DIR REGISTER_BIT(DDRD,2)
#define RX_COLL_DIR REGISTER_BIT(DDRD,3)
#define RX_YAW_DIR REGISTER_BIT(DDRB,7)
#define GYRO_ROLL REGISTER_BIT(PINC,2)
#define GYRO_PITCH REGISTER_BIT(PINC,1)
#define GYRO_YAW REGISTER_BIT(PINC,0)
#define GYRO_ROLL_DIR REGISTER_BIT(DDRC,2)
#define GYRO_PITCH_DIR REGISTER_BIT(DDRC,1)
#define GYRO_YAW_DIR REGISTER_BIT(DDRC,0)
#define GAIN_ROLL REGISTER_BIT(PINC,3)
#define GAIN_PITCH REGISTER_BIT(PINC,4)
#define GAIN_YAW REGISTER_BIT(PINC,5)
#define GAIN_ROLL_DIR REGISTER_BIT(DDRC,3)
#define GAIN_PITCH_DIR REGISTER_BIT(DDRC,4)
#define GAIN_YAW_DIR REGISTER_BIT(DDRC,5)
#define M1 REGISTER_BIT(PORTB,2)
#define M2 REGISTER_BIT(PORTB,1)
#define M3 REGISTER_BIT(PORTB,0)
#define M4 REGISTER_BIT(PORTD,7)
#define M5 REGISTER_BIT(PORTD,6)
#define M6 REGISTER_BIT(PORTD,5)
#define M1_DIR REGISTER_BIT(DDRB,2)
#define M2_DIR REGISTER_BIT(DDRB,1)
#define M3_DIR REGISTER_BIT(DDRB,0)
#define M4_DIR REGISTER_BIT(DDRD,7)
#define M5_DIR REGISTER_BIT(DDRD,6)
#define M6_DIR REGISTER_BIT(DDRD,5)
#define LED REGISTER_BIT(PORTB,6)
#define LED_DIR REGISTER_BIT(DDRB,6)
#endif //IO_CFG_H