1 Star 0 Fork 1

WilliamArthur / csi_pangu

forked from yocop / csi_pangu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
reboot.c 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
shuke 提交于 2020-05-14 14:07 . init version
/*
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
*/
/******************************************************************************
* @file reboot.c
* @brief source file for the reboot
* @version V1.0
* @date 04. April 2019
* @vendor csky
* @chip pangu
******************************************************************************/
#include <soc.h>
#include <drv/wdt.h>
void drv_reboot(int cmd)
{
uint32_t irq_flag = 0;
(void)cmd;
irq_flag = csi_irq_save();
#ifdef CONFIG_CHIP_PANGU_CPU0
wdt_handle_t wdt_handle;
wdt_handle = csi_wdt_initialize(0, NULL);
csi_wdt_start(wdt_handle);
csi_wdt_set_timeout(wdt_handle, 0);
#endif
/* waiting for reboot */
while (1);
csi_irq_restore(irq_flag);
}
1
https://gitee.com/st-lucifer/csi_pangu.git
git@gitee.com:st-lucifer/csi_pangu.git
st-lucifer
csi_pangu
csi_pangu
master

搜索帮助