1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/gd32v/periph/pm.c
Koen Zandberg 3d470b0c12 cpu/gd32v: Initial include of the GD32VF103 device
This adds support for the gd32v class devices from Gigadevice. The
gd32vf103 contains an 108 MHz RISC-V core with similar peripherals as
the stm32f1 devices

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2021-08-24 14:30:23 +02:00

35 lines
628 B
C

/*
* Copyright 2020 Koen Zandberg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup cpu_gd32v
* @{
*
* @brief Implementation of the CPU power management for Gigadevice GD32V
*
* @author Koen Zandberg <koen@bergzand.net>
* @}
*/
#include <stdint.h>
#include "periph/pm.h"
#include "periph/wdt.h"
void pm_set_lowest(void)
{
__asm__ volatile ("wfi");
}
void pm_reboot(void)
{
wdt_setup_reboot(0, 1);
wdt_start();
wdt_kick();
while (1) {}
}