aboutsummaryrefslogtreecommitdiff
path: root/bootloaders/nuevo_diskloader/src/Platform.h
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2011-10-21 16:33:52 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2011-10-21 16:33:52 -0400
commit0f6498ae1dce530fe37c08e01324c391436ac77c (patch)
tree51bfedc776978e21771fce621d01ed7f9852d6d7 /bootloaders/nuevo_diskloader/src/Platform.h
parent37c1c455eeff5100e7d9e8c1de5012f5445d5f4d (diff)
added more USB source adapted from sketch core. still not enumerating.
Diffstat (limited to 'bootloaders/nuevo_diskloader/src/Platform.h')
-rw-r--r--bootloaders/nuevo_diskloader/src/Platform.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/bootloaders/nuevo_diskloader/src/Platform.h b/bootloaders/nuevo_diskloader/src/Platform.h
index e300690..4b58f9f 100644
--- a/bootloaders/nuevo_diskloader/src/Platform.h
+++ b/bootloaders/nuevo_diskloader/src/Platform.h
@@ -27,9 +27,16 @@ typedef unsigned long u32;
#define CDC_ENABLED
+#define USB_PID_LEONARDO 0x0034
+#define USB_PID_MICRO 0x0035
+#define USB_VID 0x2341 // arduino LLC vid
+#define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro
+
//#include "USBDesc.h"
//#include "../../../cores/arduino/USBCore.h"
-#include "USBAPI.h"
+
+
+#define min(a,b) ((a)<(b)?(a):(b))
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD)
@@ -44,6 +51,7 @@ typedef unsigned long u32;
#define RX_LED_ON() PORTB &= ~(1<<0)
#define L_LED_OFF() PORTC &= ~(1<<7)
#define L_LED_ON() PORTC |= (1<<7)
+#define L_LED_TOGGLE() PORTC ^= (1<<7)
// these for non-XXX boards
//#define LED0 PORTC &= ~(1<<7)
@@ -57,4 +65,8 @@ typedef unsigned long u32;
} /* extern "C"{ */
#endif
+#include "USBDesc.h"
+#include "USBCore.h"
+#include "USBAPI.h"
+
#endif /* __PLATFORM_H__ */