master
Stefan Dorn 2016-06-12 03:55:36 +01:00
parent cf032d1395
commit afc7d9f87c
3 changed files with 0 additions and 37 deletions

View File

@ -81,7 +81,6 @@ int8_t usb_keyboard_press(uint8_t key, uint8_t modifier);
int8_t usb_keyboard_send(void);
extern uint8_t keyboard_modifier_keys;
extern uint8_t keyboard_keys[6];
extern volatile uint8_t keyboard_leds;
extern uint16_t consumer_key;

View File

@ -448,41 +448,6 @@ void kbfun_layer_sticky() {
}
}
// ----------------------------------------------------------------------------
// device
// ----------------------------------------------------------------------------
/*
* [name]
* Jump to Bootloader
*
* [description]
* For reflashing the controller
*/
// from PJRC (slightly modified)
// <http://www.pjrc.com/teensy/jump_to_bootloader.html>
void kbfun_jump_to_bootloader(void) {
// --- for all Teensy boards ---
cli();
// disable watchdog, if enabled
// disable all peripherals
UDCON = 1;
USBCON = (1<<FRZCLK); // disable USB
UCSR1B = 0;
_delay_ms(5);
// --- Teensy 2.0 specific ---
EIMSK = 0; PCICR = 0; SPCR = 0; ACSR = 0; EECR = 0; ADCSRA = 0;
TIMSK0 = 0; TIMSK1 = 0; TIMSK3 = 0; TIMSK4 = 0; UCSR1B = 0; TWCR = 0;
DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; TWCR = 0;
PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0;
asm volatile("jmp 0x7E00");
}
// ----------------------------------------------------------------------------
// special
// ----------------------------------------------------------------------------

View File

@ -3,7 +3,6 @@ void kbfun_mediakey_press_release(void);
void kbfun_2_keys_capslock_press_release(void);
void kbfun_control_press_release(void);
void kbfun_shift_press_release(void);
void kbfun_jump_to_bootloader(void);
void kbfun_layer_disable();
void kbfun_layer_sticky();
void kbfun_layer_enable();