53 lines
792 B
C
53 lines
792 B
C
|
#ifndef PWM_CAP_H_
|
||
|
#define PWM_CAP_H_
|
||
|
|
||
|
|
||
|
void pwm_Initial_Cap(UINT8 id);
|
||
|
double pwm_getCapVal(UINT8 id);
|
||
|
void pwm_enableCapIRQ(UINT8 id,UINT8 en);
|
||
|
double pwm_getCapVal(UINT8 id);
|
||
|
void pwm_cap_Int_Handler(void *para);
|
||
|
|
||
|
extern double capdata[125];
|
||
|
|
||
|
|
||
|
#define PWM_CAP_TIMES 1
|
||
|
#define PWM_CAP_INTERVAL 1//64
|
||
|
#define PWM_CAP_GLITCH 0x7//0xF
|
||
|
#define PWM_CAP_ENABLE 1
|
||
|
|
||
|
|
||
|
|
||
|
typedef enum{
|
||
|
PWM_CAP_CH0 = 0,
|
||
|
PWM_CAP_CH1,
|
||
|
PWM_CAP_CH2,
|
||
|
PWM_CAP_CH3,
|
||
|
}PWM_CAP_CH;
|
||
|
|
||
|
typedef enum{
|
||
|
PWM_CAP_NUM = 0,
|
||
|
PWM_CAP_EXIT,
|
||
|
}PWM_CAP_METHOD;
|
||
|
|
||
|
typedef enum{
|
||
|
PWM_CAP_UINT_1MS = 0,
|
||
|
PWM_CAP_UINT_10MS,
|
||
|
PWM_CAP_UINT_100MS,
|
||
|
PWM_CAP_UINT_1000MS = 4,
|
||
|
}PWM_CAP_BASED_UINT;
|
||
|
|
||
|
typedef enum{
|
||
|
PWM_CAP_NO_INT = 0,
|
||
|
PWM_CAP_ONCE_INT,
|
||
|
PWM_CAP_ONCE_FINISH_INT,
|
||
|
PWM_CAP_FINISH_ALL,
|
||
|
}PWM_CAP_INT_METHOD;
|
||
|
|
||
|
|
||
|
|
||
|
#endif
|
||
|
|
||
|
|
||
|
|