Merge CDC-ECM, RNG, DFU bootloader, watchdog, settings manager, energy scan routines of Robert Quattlebaum
This commit is contained in:
parent
7b529cac03
commit
110bc0242e
42 changed files with 4739 additions and 2669 deletions
24
cpu/avr/bootloader.h
Normal file
24
cpu/avr/bootloader.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef __AVR_BOOTLOADER_H__
|
||||
#define __AVR_BOOTLOADER_H__
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/io.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define ATTR_INIT_SECTION(SectionIndex) __attribute__ ((naked, section (".init" #SectionIndex )))
|
||||
#define ATTR_NO_INIT __attribute__ ((section (".noinit")))
|
||||
|
||||
#ifndef BOOTLOADER_SEC_SIZE_BYTES
|
||||
#define BOOTLOADER_SEC_SIZE_BYTES (0x1000)
|
||||
#endif
|
||||
|
||||
#ifndef BOOTLOADER_START_ADDRESS
|
||||
#define BOOTLOADER_START_ADDRESS (FLASHEND-BOOTLOADER_SEC_SIZE_BYTES+1)
|
||||
#endif
|
||||
|
||||
#define MAGIC_BOOT_KEY 0xDC42ACCA
|
||||
|
||||
extern void Jump_To_Bootloader(void);
|
||||
extern bool bootloader_is_present(void);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue