Format code according to conventions (#15593)
This commit is contained in:
parent
1127e0da6b
commit
be2265d0d1
15 changed files with 37 additions and 46 deletions
|
@ -19,8 +19,7 @@
|
|||
#include <avr/eeprom.h>
|
||||
#include <avr/wdt.h>
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) {
|
||||
__attribute__((weak)) void bootloader_jump(void) {
|
||||
// force bootloadHID to stay in bootloader mode, so that it waits
|
||||
// for a new firmware to be flashed
|
||||
// NOTE: this byte is part of QMK's "magic number" - changing it causes the EEPROM to be re-initialized
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include <avr/wdt.h>
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) {
|
||||
__attribute__((weak)) void bootloader_jump(void) {
|
||||
// this block may be optional
|
||||
// TODO: figure it out
|
||||
|
||||
|
@ -35,5 +34,6 @@ void bootloader_jump(void) {
|
|||
wdt_enable(WDTO_60MS);
|
||||
|
||||
// wait for watchdog timer to trigger
|
||||
while (1) { }
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
#define BOOTLOADER_RESET_KEY 0xB007B007
|
||||
uint32_t reset_key __attribute__((section(".noinit,\"aw\",@nobits;")));
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) {
|
||||
__attribute__((weak)) void bootloader_jump(void) {
|
||||
UDCON = 1;
|
||||
USBCON = (1 << FRZCLK); // disable USB
|
||||
UCSR1B = 0;
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) {
|
||||
__attribute__((weak)) void bootloader_jump(void) {
|
||||
// http://www.pjrc.com/teensy/jump_to_bootloader.html
|
||||
|
||||
cli();
|
||||
|
|
|
@ -16,5 +16,4 @@
|
|||
|
||||
#include "bootloader.h"
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) { }
|
||||
__attribute__((weak)) void bootloader_jump(void) {}
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
__attribute__((weak))
|
||||
void bootloader_jump(void) {
|
||||
__attribute__((weak)) void bootloader_jump(void) {
|
||||
// Taken with permission of Stephan Baerwolf from https://github.com/tinyusbboard/API/blob/master/apipage.c
|
||||
|
||||
wdt_enable(WDTO_15MS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue