3#if defined(CORE_SAME51)
11 #define PORT_TYPE uint32_t
12 #define BOARD_MAX_DIGITAL_PINS 54
13 #define BOARD_MAX_IO_PINS 58
16 #define PINMASK_TYPE uint8_t
17 #define COMPARE_TYPE uint16_t
18 #define COUNTER_TYPE uint16_t
19 #define SERIAL_BUFFER_SIZE 257
20 #define FPU_MAX_SIZE 32
22 #define EEPROM_LIB_H "src/SPIAsEEPROM/SPIAsEEPROM.h"
34 #define EEPROM_LIB_H "src/FlashStorage/FlashAsEEPROM.h"
37 #define RTC_LIB_H "TimeLib.h"
43 #if defined(TIMER5_MICROS)
45 #define millis() (ms_counter)
48 #define micros_safe() micros()
50 #define pinIsReserved(pin) ( ((pin) == 0) )
74 #define FUEL1_COUNTER TCC0->COUNT.reg
75 #define FUEL2_COUNTER TCC0->COUNT.reg
76 #define FUEL3_COUNTER TCC0->COUNT.reg
77 #define FUEL4_COUNTER TCC0->COUNT.reg
79 #define FUEL5_COUNTER TCC1->COUNT.reg
80 #define FUEL6_COUNTER TCC1->COUNT.reg
81 #define FUEL7_COUNTER TCC1->COUNT.reg
82 #define FUEL8_COUNTER TCC1->COUNT.reg
84 #define IGN1_COUNTER TCC1->COUNT.reg
85 #define IGN2_COUNTER TCC1->COUNT.reg
86 #define IGN3_COUNTER TCC2->COUNT.reg
87 #define IGN4_COUNTER TCC2->COUNT.reg
89 #define IGN5_COUNTER TCC1->COUNT.reg
90 #define IGN6_COUNTER TCC1->COUNT.reg
91 #define IGN7_COUNTER TCC2->COUNT.reg
92 #define IGN8_COUNTER TCC2->COUNT.reg
94 #define FUEL1_COMPARE TCC0->CC[0].bit.CC
95 #define FUEL2_COMPARE TCC0->CC[1].bit.CC
96 #define FUEL3_COMPARE TCC0->CC[2].bit.CC
97 #define FUEL4_COMPARE TCC0->CC[3].bit.CC
99 #define FUEL5_COMPARE TCC1->CC[0].bit.CC
100 #define FUEL6_COMPARE TCC1->CC[1].bit.CC
101 #define FUEL7_COMPARE TCC1->CC[2].bit.CC
102 #define FUEL8_COMPARE TCC1->CC[3].bit.CC
104 #define IGN1_COMPARE TCC1->CC[0].bit.CC
105 #define IGN2_COMPARE TCC1->CC[1].bit.CC
106 #define IGN3_COMPARE TCC2->CC[0].bit.CC
107 #define IGN4_COMPARE TCC2->CC[1].bit.CC
109 #define IGN5_COMPARE TCC1->CC[0].bit.CC
110 #define IGN6_COMPARE TCC1->CC[1].bit.CC
111 #define IGN7_COMPARE TCC2->CC[0].bit.CC
112 #define IGN8_COMPARE TCC2->CC[1].bit.CC
154 #define MAX_TIMER_PERIOD 139808
155 #define MAX_TIMER_PERIOD_SLOW 139808
156 #define uS_TO_TIMER_COMPARE(uS) ((uS * 15) >> 5)
158 #define uS_TO_TIMER_COMPARE_SLOW(uS) ((uS * 15) >> 5)
166 #define ENABLE_BOOST_TIMER() TC4->COUNT16.INTENSET.bit.MC0 = 0x1
167 #define DISABLE_BOOST_TIMER() TC4->COUNT16.INTENSET.bit.MC0 = 0x0
169 #define ENABLE_VVT_TIMER() TC4->COUNT16.INTENSET.bit.MC1 = 0x1
170 #define DISABLE_VVT_TIMER() TC4->COUNT16.INTENSET.bit.MC1 = 0x0
172 #define BOOST_TIMER_COMPARE TC4->COUNT16.CC[0].reg
173 #define BOOST_TIMER_COUNTER TC4->COUNT16.COUNT.bit.COUNT
174 #define VVT_TIMER_COMPARE TC4->COUNT16.CC[1].reg
175 #define VVT_TIMER_COUNTER TC4->COUNT16.COUNT.bit.COUNT
182 #define IDLE_COUNTER TC5->COUNT16.COUNT.bit.COUNT
183 #define IDLE_COMPARE TC5->COUNT16.CC[0].reg
185 #define IDLE_TIMER_ENABLE() TC5->COUNT16.INTENSET.bit.MC0 = 0x1
186 #define IDLE_TIMER_DISABLE() TC5->COUNT16.INTENSET.bit.MC0 = 0x0
#define secondarySerial
Definition comms_secondary.h:15
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349