generated from Embedded_Projects/MPyATE_Template
Yilin Sun
c5fae6db36
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Yilin Sun <imi415@imi.moe>
20 lines
405 B
C
20 lines
405 B
C
/* App */
|
|
#include "app_reg_if.h"
|
|
|
|
/* Private */
|
|
#include "app_sys_utils.h"
|
|
|
|
#define APP_SYS_RST_Pos 15
|
|
#define APP_SYS_RST_Msk (1U << APP_SYS_RST_Pos)
|
|
|
|
void app_sys_util_update(void) {
|
|
uint16_t cfg = app_reg_if_internal_read(APP_REG_CFG);
|
|
|
|
if (cfg & APP_SYS_RST_Msk) {
|
|
cfg &= ~(APP_SYS_RST_Msk);
|
|
|
|
app_reg_if_internal_write(APP_REG_CFG, cfg);
|
|
|
|
app_sys_util_reset();
|
|
}
|
|
} |