   STRATEGY_ASM_8_CLOCKS,
 } sumpStrategy = STRATEGY_NORMAL;
 
+#if Teensy_4_0
+
+int F_BUS = F_BUS_ACTUAL;
+
+// cpu clock cycles between samples
+uint32_t cpuClockCycles;
+uint32_t previousSampleTime;
+
+#endif
+
 int currentFBUS = F_BUS;
 uint32_t sumpRunning = 0;
 

/* Teensy Logic Analyzer
 * Copyright (c) 2018 LAtimes2
 *
 * The MIT License (MIT)
 *


#else
 
#if Teensy_4_0
  // GPIO read seems to take 8 clock cycles
  if (sumpSetup.cpuClockTicks <= 8)
#else
  if (sumpSetup.cpuClockTicks <= 3)
#endif
  {
    sumpStrategy = STRATEGY_ASM_3_CLOCKS;
    sumpSetup.numberOfChannels = 8;
  }
#if Teensy_LC
  else if (sumpSetup.cpuClockTicks <= 6)
#else
  else if (sumpSetup.cpuClockTicks <= 5)
#endif
  {
    sumpStrategy = STRATEGY_ASM_5_6_CLOCKS;
    sumpSetup.numberOfChannels = 8;
  }
#if Teensy_4_0
  // GPIO read seems to take 8 clock cycles
  else if (sumpSetup.cpuClockTicks <= 11)
#else
  else if (sumpSetup.cpuClockTicks <= 8)
#endif
  {
    sumpStrategy = STRATEGY_ASM_8_CLOCKS;
    sumpSetup.numberOfChannels = 8;
