   static int32_t cycle = 1;
 
   // Wait for rising edge on clock pin
+#if defined(SQUARE_WAVE_CLOCK)
   while (clkPin.is_clear()) yield();
+#else
+  clock.await();
+#endif
   ledPin.set();
 
   // Read the time from the rtc device and print

OutputPin ledPin(Board::LED);

// Clock pin
#if defined(ARDUINO_PRO_MICRO)
InputPin clkPin(Board::D0);
#else
InputPin clkPin(Board::D2);
#endif

void setup()

  cycle += 1;

  // Wait for falling edge on clock pin
#if defined(SQUARE_WAVE_CLOCK)
  while (clkPin.is_set()) yield();
#endif
  ledPin.clear();
}
