mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-14 19:03:20 +00:00
Split sys.h API over MG_SYS_*
This commit is contained in:
1 parent
7e75e51332
commit
a0f8a197c9
11 files changed
+96
-30
No files matched your search
+11
-10
@@ -815,14 +815,6 @@ struct timeval {
|
||||
#define MG_EPOLL_MOD(c, wr)
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_STM32H5
|
||||
#define MG_ENABLE_STM32H5 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_STM32H7
|
||||
#define MG_ENABLE_STM32H7 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1702,13 +1694,20 @@ size_t mg_ota_size(int firmware); // Firmware size
|
||||
|
||||
bool mg_ota_commit(void); // Commit current firmware
|
||||
bool mg_ota_rollback(void); // Rollback to the previous firmware
|
||||
|
||||
void mg_sys_reset(void); // Reboot device immediately
|
||||
// Copyright (c) 2023 Cesanta Software Limited
|
||||
// All rights reserved
|
||||
|
||||
|
||||
|
||||
#define MG_SYS_NONE 0 // Dummy system
|
||||
#define MG_SYS_STM32H5 1 // STM32 H5
|
||||
#define MG_SYS_STM32H7 2 // STM32 H7
|
||||
#define MG_SYS_CUSTOM 100 // Custom implementation
|
||||
|
||||
#ifndef MG_SYS
|
||||
#define MG_SYS MG_SYS_NONE
|
||||
#endif
|
||||
|
||||
// Flash information
|
||||
void *mg_flash_start(void); // Return flash start address
|
||||
size_t mg_flash_size(void); // Return flash size
|
||||
@@ -1726,6 +1725,8 @@ bool mg_flash_swap_bank(void);
|
||||
bool mg_flash_load(void *sector, uint32_t key, void *buf, size_t len);
|
||||
bool mg_flash_save(void *sector, uint32_t key, const void *buf, size_t len);
|
||||
|
||||
void mg_sys_reset(void); // Reboot device immediately
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user