Subversion Repositories NaviCtrl

Rev

Rev 588 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 588 Rev 841
1
#ifndef _TIMER2_H
1
#ifndef _TIMER2_H
2
#define _TIMER2_H
2
#define _TIMER2_H
3
 
3
 
4
typedef struct
4
typedef struct
5
{
5
{
6
//      u8 Refresh;
6
//      u8 Refresh;
7
        u8 CompInvert;
7
        u8 CompInvert;
8
        u8 NickControl;
8
        u8 NickControl;
9
//      u8 NickComp;
9
//      u8 NickComp;
10
//      u8 NickMin; 
10
//      u8 NickMin; 
11
//      u8 NickMax;
11
//      u8 NickMax;
12
        u8 RollControl;
12
        u8 RollControl;
13
//      u8 RollComp;
13
//      u8 RollComp;
14
//      u8 RollMin; 
14
//      u8 RollMin; 
15
//      u8 RollMax;             
15
//      u8 RollMax;             
16
} __attribute__((packed)) ServoParams_t;
16
} __attribute__((packed)) ServoParams_t;
17
 
-
 
18
// bitcoding for ServoParams.ServoCompInvert
-
 
19
#define SERVO_NICK_INV 0x01
-
 
20
#define SERVO_ROLL_INV 0x02
-
 
21
#define SERVO_RELATIVE 0x04   //  direct poti control or relative moving of the servo value
-
 
22
#define CH_DIRECTION_1 0x08
-
 
23
#define CH_DIRECTION_2 0x10
-
 
24
 
-
 
25
//CH Orientation     ServoBits          0x08    0x10
-
 
26
// --> no change                        0       0
-
 
27
// --> front to starting point          0       1
-
 
28
// --> rear to to starting point        1       0
-
 
29
//-> start orientation                  1       1
17
 
30
 
18
 
31
 
19
 
32
extern volatile ServoParams_t ServoParams;
20
extern volatile ServoParams_t ServoParams;
33
 
21
 
34
void TIMER2_Init(void);
22
void TIMER2_Init(void);
35
void TIMER2_Deinit(void);
23
void TIMER2_Deinit(void);
36
 
24
 
37
#endif  // _TIMER2_H
25
#endif  // _TIMER2_H
38
 
26