Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
rboot-api.h
1 #ifndef __RBOOT_API_H__
2 #define __RBOOT_API_H__
3 
15 #include <rboot.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
26 typedef struct {
27  uint32 start_addr;
28  uint32 start_sector;
29  //uint32 max_sector_count;
30  int32 last_sector_erased;
31  uint8 extra_count;
32  uint8 extra_bytes[4];
34 
40 rboot_config ICACHE_FLASH_ATTR rboot_get_config(void);
41 
50 bool ICACHE_FLASH_ATTR rboot_set_config(rboot_config *conf);
51 
58 uint8 ICACHE_FLASH_ATTR rboot_get_current_rom(void);
59 
66 bool ICACHE_FLASH_ATTR rboot_set_current_rom(uint8 rom);
67 
75 rboot_write_status ICACHE_FLASH_ATTR rboot_write_init(uint32 start_addr);
76 
84 bool ICACHE_FLASH_ATTR rboot_write_end(rboot_write_status *status);
85 
96 bool ICACHE_FLASH_ATTR rboot_write_flash(rboot_write_status *status, uint8 *data, uint16 len);
97 
98 #ifdef BOOT_RTC_ENABLED
99 
104 bool ICACHE_FLASH_ATTR rboot_get_rtc_data(rboot_rtc_data *rtc);
105 
111 bool ICACHE_FLASH_ATTR rboot_set_rtc_data(rboot_rtc_data *rtc);
112 
121 bool ICACHE_FLASH_ATTR rboot_set_temp_rom(uint8 rom);
122 
129 bool ICACHE_FLASH_ATTR rboot_get_last_boot_rom(uint8 *rom);
130 
137 bool ICACHE_FLASH_ATTR rboot_get_last_boot_mode(uint8 *mode);
138 #endif
139 
140 #ifdef __cplusplus
141 }
142 #endif
143 
145 #endif
bool ICACHE_FLASH_ATTR rboot_write_end(rboot_write_status *status)
Complete flash write process.
bool ICACHE_FLASH_ATTR rboot_write_flash(rboot_write_status *status, uint8 *data, uint16 len)
Write data to flash memory.
Structure containing rBoot configuration.
Definition: rboot.h:107
rboot_write_status ICACHE_FLASH_ATTR rboot_write_init(uint32 start_addr)
Initialise flash write process.
uint8 ICACHE_FLASH_ATTR rboot_get_current_rom(void)
Get index of current ROM.
rboot_config ICACHE_FLASH_ATTR rboot_get_config(void)
Read rBoot configuration from flash.
Structure defining flash write status.
Definition: rboot-api.h:26
bool ICACHE_FLASH_ATTR rboot_set_current_rom(uint8 rom)
Set the index of current ROM.
bool ICACHE_FLASH_ATTR rboot_set_config(rboot_config *conf)
Write rBoot configuration to flash memory.