47 #define angleOfSingleIteration (180 * ANGLE_FACTOR)
51 #define E2 (E0 + angleOfSingleIteration)
52 #define E3 (E1 + angleOfSingleIteration)
53 #define E4 (E0 + (2 * angleOfSingleIteration))
54 #define E5 (E1 + (2 * angleOfSingleIteration))
55 #define E6 (E0 + (3 * angleOfSingleIteration))
56 #define E7 (E1 + (3 * angleOfSingleIteration))
59 #if (E1 >= angleOfSingleIteration)
60 #error "Angle E1 defined to be larger than the available angle which it is within!"
81 unsigned char PTITCurrentState =
PTIT;
90 if(
TFLGOF && !(edgeTimeStamp & 0x8000)){
95 unsigned long thisEventTimeStamp = timeStamp.
timeLong;
97 unsigned char lastEvent = 0;
98 unsigned short thisTicksPerDegree = 0;
99 if(PTITCurrentState & 0x01){
101 unsigned long primaryLeadingEdgeTimeStamp = timeStamp.
timeLong;
103 lastPrimaryEventTimeStamp = primaryLeadingEdgeTimeStamp;
123 unsigned long secondaryLeadingEdgeTimeStamp = timeStamp.
timeLong;
125 lastSecondaryEventTimeStamp = secondaryLeadingEdgeTimeStamp;
145 unsigned long thisInterEventPeriod = 0;
152 unsigned short thisAngle = 0;
164 unsigned short ratioBetweenThisAndLast = (
unsigned short)(((
unsigned long)
lastTicksPerDegree * 1000) / thisTicksPerDegree);
176 SCHEDULE_ECT_OUTPUTS();
204 #include "../inc/defaultSecondaryRPMISR.c"