forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheboot_command.h
37 lines (28 loc) · 836 Bytes
/
eboot_command.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved.
* This file is part of eboot bootloader.
*
* Redistribution and use is permitted according to the conditions of the
* 3-clause BSD license to be found in the LICENSE file.
*/
#ifndef EBOOT_COMMAND_H
#define EBOOT_COMMAND_H
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#define RTC_MEM ((volatile uint32_t*)0x60001200)
enum action_t {
ACTION_COPY_RAW = 0x00000001,
ACTION_LOAD_APP = 0xffffffff
};
#define EBOOT_MAGIC 0xeb001000
#define EBOOT_MAGIC_MASK 0xfffff000
struct eboot_command {
uint32_t magic;
enum action_t action;
uint32_t args[29];
uint32_t crc32;
};
int eboot_command_read(struct eboot_command* cmd);
void eboot_command_write(struct eboot_command* cmd);
void eboot_command_clear();
#endif //EBOOT_COMMAND_H