mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
reading eboot commands via RTC, flash erase/copy
This commit is contained in:
29
bootloaders/eboot/eboot_command.h
Normal file
29
bootloaders/eboot/eboot_command.h
Normal file
@ -0,0 +1,29 @@
|
||||
#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;
|
||||
};
|
||||
|
||||
|
||||
void eboot_command_read(struct eboot_command* cmd);
|
||||
|
||||
|
||||
#endif //EBOOT_COMMAND_H
|
Reference in New Issue
Block a user