17 #define PORT_TYPE uint32_t //Size of the port variables
18 #define PINMASK_TYPE uint32_t
19 #define COMPARE_TYPE uint16_t
20 #define COUNTER_TYPE uint16_t
21 #define SERIAL_BUFFER_SIZE 517 //Size of the serial buffer used by new comms protocol. For SD transfers this must be at least 512 + 1 (flag) + 4 (sector)
22 #define FPU_MAX_SIZE 32 //Size of the FPU buffer. 0 means no FPU.
23 #define BOARD_MAX_DIGITAL_PINS 54
24 #define BOARD_MAX_IO_PINS 54
25 #define BOARD_MAX_ADC_PINS 17 //Number of analog pins
29 #define SD_LOGGING //SD logging enabled by default for Teensy 4.1 as it has the slot built in
30 #define RTC_LIB_H "TimeLib.h"
31 #define SD_CONFIG SdioConfig(FIFO_SDIO) //Set Teensy to use SDIO in FIFO mode. This is the fastest SD mode on Teensy as it offloads most of the writes
32
33 #define micros_safe() micros() //timer5 method is not used on anything but AVR, the micros_safe() macro is simply an alias for the normal micros()
127 #define uS_TO_TIMER_COMPARE(uS) ((uS * 75UL) >> 6) //Converts a given number of uS into the required number of timer ticks until that time has passed.
128/*
129 To calculate the above uS_TO_TIMER_COMPARE
130 Choose number of bit of precision. Eg: 6
131 Divide 2^6 by the time per tick (0.853333) = 75
132 Multiply and bitshift back by the precision: (uS * 75) >> 6