Subversion Repositories NaviCtrl

Rev

Rev 588 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef _TIMER2_H
#define _TIMER2_H

typedef struct
{
//      u8 Refresh;
        u8 CompInvert;
        u8 NickControl;
//      u8 NickComp;
//      u8 NickMin;
//      u8 NickMax;
        u8 RollControl;
//      u8 RollComp;
//      u8 RollMin;
//      u8 RollMax;            
} __attribute__((packed)) ServoParams_t;

// bitcoding for ServoParams.ServoCompInvert
#define SERVO_NICK_INV 0x01
#define SERVO_ROLL_INV 0x02
#define SERVO_RELATIVE 0x04   //  direct poti control or relative moving of the servo value
#define CH_DIRECTION_1 0x08
#define CH_DIRECTION_2 0x10

//CH Orientation     ServoBits          0x08    0x10
// --> no change                        0       0
// --> front to starting point          0       1
// --> rear to to starting point        1       0
//-> start orientation                  1       1


extern volatile ServoParams_t ServoParams;

void TIMER2_Init(void);
void TIMER2_Deinit(void);

#endif  // _TIMER2_H