14 #define PORT_TYPE uint8_t //Size of the port variables (Eg inj1_pin_port).
15 #define PINMASK_TYPE uint8_t
16 #define COMPARE_TYPE uint16_t
17 #define COUNTER_TYPE uint16_t
18 #define SERIAL_BUFFER_SIZE (256+7+1) //Size of the serial buffer used by new comms protocol. The largest single packet is the O2 calibration which is 256 bytes + 7 bytes of overhead
19 #define FPU_MAX_SIZE 0 //Size of the FPU buffer. 0 means no FPU.
38/*#define micros() (((timer5_overflow_count << 16) + TCNT5) * 4) *///Fast version of micros() that uses the 4uS tick of timer5. See timers.ino for the overflow ISR of timer5
39 #define millis() (ms_counter) //Replaces the standard millis() function with this macro. It is both faster and more accurate. See timers.ino for its counter increment.
40staticinlineunsignedlongmicros_safe(); //A version of micros() that is interrupt safe
41 #else
42 #define micros_safe() micros() //If the timer5 method is not used, the micros_safe() macro is simply an alias for the normal micros()
43 #endif
44 #define pinIsReserved(pin) ( ((pin) == 0) ) //Forbidden pins like USB on other boards
45
46//Mega 2561 MCU does not have a serial3 available.
111//These have the TIFR5 bits set to 1 to clear the interrupt flag. This prevents a false interrupt being called the first time the channel is enabled.
130 #define MAX_TIMER_PERIOD 262140UL //The longest period of time (in uS) that the timer can permit (IN this case it is 65535 * 4, as each timer tick is 4uS)
131 #define uS_TO_TIMER_COMPARE(uS1) ((uS1) >> 2) //Converts a given number of uS into the required number of timer ticks until that time has passed