Finished USB for Teensy 3.1 (Now 3.1 compatible!)
This commit is contained in:
parent
3fa9c16c04
commit
8263589e7e
7 changed files with 73 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2011 by Jacob Alexander
|
||||
/* Copyright (C) 2011-2014 by Jacob Alexander
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -42,7 +42,7 @@ inline void init_errorLED()
|
|||
DDRD |= (1<<6);
|
||||
|
||||
// ARM
|
||||
#elif defined(_mk20dx128_)
|
||||
#elif defined(_mk20dx128_) || defined(_mk20dx256_)
|
||||
|
||||
// Setup pin - Pin 11 -> C5 - See Lib/pin_map.teensy3 for more details on pins
|
||||
PORTC_PCR5 = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
|
||||
|
@ -68,7 +68,7 @@ inline void errorLED( uint8_t on )
|
|||
}
|
||||
|
||||
// ARM
|
||||
#elif defined(_mk20dx128_)
|
||||
#elif defined(_mk20dx128_) || defined(_mk20dx256_)
|
||||
|
||||
// Error LED On (C5)
|
||||
if ( on ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2011-2013 by Jacob Alexander
|
||||
/* Copyright (C) 2011-2014 by Jacob Alexander
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -37,7 +37,7 @@ void usb_debug_putstr( char* s )
|
|||
#if defined(_at90usb162_) || defined(_atmega32u4_) || defined(_at90usb646_) || defined(_at90usb1286_) // AVR
|
||||
while ( *s != '\0' )
|
||||
usb_debug_putchar( *s++ );
|
||||
#elif defined(_mk20dx128_) // ARM
|
||||
#elif defined(_mk20dx128_) || defined(_mk20dx256_) // ARM
|
||||
// Count characters until NULL character, then send the amount counted
|
||||
uint32_t count = 0;
|
||||
while ( s[count] != '\0' )
|
||||
|
@ -84,7 +84,7 @@ void _print(const char *s)
|
|||
usb_debug_putchar('\r');
|
||||
usb_debug_putchar(c);
|
||||
}
|
||||
#elif defined(_mk20dx128_) // ARM
|
||||
#elif defined(_mk20dx128_) || defined(_mk20dx256_) // ARM
|
||||
usb_debug_putstr( (char*)s );
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2011-2013 by Jacob Alexander
|
||||
/* Copyright (C) 2011-2014 by Jacob Alexander
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include <avr/pgmspace.h>
|
||||
#include "avr/usb_keyboard_debug.h"
|
||||
|
||||
#elif defined(_mk20dx128_)
|
||||
#elif defined(_mk20dx128_) || defined(_mk20dx256_)
|
||||
|
||||
#include "arm/usb_serial.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue