Prusa3d Marlin fork
bootapp.h
1
//language.h
2
#ifndef BOOTAPP_H
3
#define BOOTAPP_H
4
5
#include "config.h"
6
#include <avr/io.h>
7
#include <inttypes.h>
8
9
10
#define RAMSIZE (RAMEND+1-RAMSTART)
11
#define boot_src_addr (*((uint32_t*)(RAMSIZE - 16)))
12
#define boot_dst_addr (*((uint32_t*)(RAMSIZE - 12)))
13
#define boot_copy_size (*((uint16_t*)(RAMSIZE - 8)))
14
#define boot_reserved (*((uint8_t*)(RAMSIZE - 6)))
15
#define boot_app_flags (*((uint8_t*)(RAMSIZE - 5)))
16
#define boot_app_magic (*((uint32_t*)(RAMSIZE - 4)))
17
#define BOOT_APP_FLG_ERASE 0x01
18
#define BOOT_APP_FLG_COPY 0x02
19
#define BOOT_APP_FLG_FLASH 0x04
20
21
#define BOOT_APP_FLG_USER0 0x80
22
23
#define BOOT_APP_MAGIC 0x55aa55aaUL
24
25
26
#if defined(__cplusplus)
27
extern
"C"
{
28
#endif
//defined(__cplusplus)
29
30
extern
void
bootapp_print_vars(
void
);
31
32
extern
void
bootapp_ram2flash(uint16_t rptr, uint16_t fptr, uint16_t size);
33
34
extern
void
bootapp_reboot_user0(uint8_t reserved);
35
36
#if defined(__cplusplus)
37
}
38
#endif
//defined(__cplusplus)
39
40
#endif
//BOOTAPP_H
Generated by
1.9.1