update teensy3 lib to latest, use new vector change mechanism
[megadrive.git] / teensy3 / usb_mem.c
index c6e902a..5912b67 100644 (file)
  * permit persons to whom the Software is furnished to do so, subject to
  * the following conditions:
  *
- * 1. The above copyright notice and this permission notice shall be 
+ * 1. The above copyright notice and this permission notice shall be
  * included in all copies or substantial portions of the Software.
  *
- * 2. If the Software is incorporated into a build system that allows 
+ * 2. If the Software is incorporated into a build system that allows
  * selection among a list of target devices, then similar target
  * devices manufactured by PJRC.COM must be included in the list of
  * target devices and selectable in the same manner.
  * SOFTWARE.
  */
 
-#include "mk20dx128.h"
-//#include "HardwareSerial.h"
 #include "usb_dev.h"
+#if F_CPU >= 20000000 && defined(NUM_ENDPOINTS)
+
+#include "kinetis.h"
+//#include "HardwareSerial.h"
 #include "usb_mem.h"
 
 __attribute__ ((section(".usbbuffers"), used))
@@ -104,3 +106,4 @@ void usb_free(usb_packet_t *p)
        //serial_print("\n");
 }
 
+#endif // F_CPU >= 20 MHz && defined(NUM_ENDPOINTS)