From 276c7a332abd52a45a143c85d4432a006eca9a12 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Mon, 6 Feb 2017 14:04:33 +0100 Subject: [PATCH] millis() is 64-bits on the Arduino/Genuino 101 See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/198814525 --- examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino b/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino index db8faadb..d5e3f1db 100644 --- a/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino +++ b/examples/USBH_MIDI/USBH_MIDI_dump/USBH_MIDI_dump.ino @@ -69,7 +69,11 @@ void MIDI_poll() pid = Midi.pid; } if (Midi.RecvData( &rcvd, bufMidi) == 0 ) { +#ifdef __ARDUINO_ARC__ + sprintf(buf, "%016llX: ", millis()); // millis() is 64-bits on the Arduino/Genuino 101 +#else sprintf(buf, "%08lX: ", millis()); +#endif Serial.print(buf); Serial.print(rcvd); Serial.print(':');