diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2012-02-03 23:15:04 -0500 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2012-02-03 23:15:04 -0500 |
commit | 4544fb1a1fd04893626dd81273a29bad69360cb2 (patch) | |
tree | bdb311b9061882779585c534c9b0e7d71ee630b6 /bootloaders/caterina_LUFA/Caterina.h | |
parent | d7b0507e8a226a639f000fd1c6e7de70117c7c84 (diff) |
proper bootloader timeout and LED control in Leonardo bootloader
Diffstat (limited to 'bootloaders/caterina_LUFA/Caterina.h')
-rwxr-xr-x | bootloaders/caterina_LUFA/Caterina.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bootloaders/caterina_LUFA/Caterina.h b/bootloaders/caterina_LUFA/Caterina.h index 4260166..7f37063 100755 --- a/bootloaders/caterina_LUFA/Caterina.h +++ b/bootloaders/caterina_LUFA/Caterina.h @@ -62,13 +62,26 @@ #define BOOTLOADER_HWVERSION_MINOR 0x00
/** Eight character bootloader firmware identifier reported to the host when requested */
- #define SOFTWARE_IDENTIFIER "LUFACDC"
+ #define SOFTWARE_IDENTIFIER "CATERINA"
+
+ #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+ #define LED_SETUP() DDRC |= (1<<7); DDRB |= (1<<0); DDRD |= (1<<5);
+ #define L_LED_OFF() PORTC &= ~(1<<7)
+ #define L_LED_ON() PORTC |= (1<<7)
+ #define L_LED_TOGGLE() PORTC ^= (1<<7)
+ #define TX_LED_OFF() PORTD |= (1<<5)
+ #define TX_LED_ON() PORTD &= ~(1<<5)
+ #define RX_LED_OFF() PORTB |= (1<<0)
+ #define RX_LED_ON() PORTB &= ~(1<<0)
/* Type Defines: */
/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
typedef void (*AppPtr_t)(void) ATTR_NO_RETURN;
/* Function Prototypes: */
+ void StartSketch(void);
+ void LEDPulse();
+
void CDC_Task(void);
void SetupHardware(void);
|