27 #define DECODER_IMPLEMENTATION_C
58 unsigned char PTITCurrentState =
PTIT;
72 unsigned long thisInterEventPeriod = 0;
89 unsigned char correctEvent = 0;
90 if(PTITCurrentState & 0x01){
91 if(!(PTITCurrentState & 0x02)){
95 if(PTITCurrentState & 0x02){
106 unsigned char lastEvent = 0;
115 if(correctEvent != 0){
123 }
else if(correctEvent != 0){
129 unsigned short thisTicksPerDegree = 0;
131 unsigned short thisAngle = 0;
141 unsigned short ratioBetweenThisAndLast = (
unsigned short)(((
unsigned long)
lastTicksPerDegree * 1000) / thisTicksPerDegree);
150 if(PTITCurrentState & 0x01){
161 SCHEDULE_ECT_OUTPUTS();
186 unsigned char PTITCurrentState =
PTIT;
201 unsigned long thisInterEventPeriod = 0;
207 unsigned char correctEvent;
208 if(PTITCurrentState & 0x02){
226 unsigned char lastEvent = 0;
244 unsigned short thisTicksPerDegree = 0;
251 unsigned short ratioBetweenThisAndLast = (
unsigned short)(((
unsigned long)
lastTicksPerDegree * 1000) / thisTicksPerDegree);
265 SCHEDULE_ECT_OUTPUTS();