27 #define DECODER_IMPLEMENTATION_C
58 unsigned char PTITCurrentState =
PTIT;
72 unsigned long thisInterEventPeriod = 0;
88 unsigned char correctEvent = 0;
89 if(PTITCurrentState & 0x01){
90 if(!(PTITCurrentState & 0x02)){
96 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 = 0;
208 if(PTITCurrentState & 0x02){
209 if(PTITCurrentState & 0x01){
228 unsigned char lastEvent = 0;
234 if(correctEvent != 0){
242 }
else if(correctEvent != 0){
248 unsigned short thisTicksPerDegree = 0;
255 unsigned short ratioBetweenThisAndLast = (
unsigned short)(((
unsigned long)
lastTicksPerDegree * 1000) / thisTicksPerDegree);
269 SCHEDULE_ECT_OUTPUTS();