Browse Source

cpu: x86: adapt to periph/pm

pr/spi.typo
Kaspar Schleiser 6 years ago
parent
commit
8c8ce5a092
  1. 1
      cpu/x86/Makefile.include
  2. 8
      cpu/x86/x86_reboot.c

1
cpu/x86/Makefile.include

@ -1,2 +1,3 @@
export USEMODULE += quad_math
export USEMODULE += periph_common
export USEPKG += tlsf

8
cpu/x86/x86_reboot.c

@ -33,6 +33,7 @@
#include "x86_interrupts.h"
#include "x86_ports.h"
#include "x86_reboot.h"
#include "periph/pm.h"
#define KBC_DATA (0x60)
#define KBC_STATUS (0x64)
@ -86,7 +87,7 @@ void NORETURN x86_kbc_reboot(void)
static x86_reboot_t reboot_fun;
static bool reboot_twice;
void reboot(void)
void pm_reboot(void)
{
__asm__ volatile ("cli");
if (!reboot_twice) {
@ -98,6 +99,11 @@ void reboot(void)
x86_kbc_reboot();
}
void pm_off(void)
{
x86_shutdown();
}
void x86_set_reboot_fun(x86_reboot_t fun)
{
reboot_fun = fun;

Loading…
Cancel
Save