Skip to content

Commit

Permalink
cpu: x86: adapt to periph/pm
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Jan 12, 2017
1 parent fb46d57 commit 8c8ce5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions cpu/x86/Makefile.include
@@ -1,2 +1,3 @@
export USEMODULE += quad_math
export USEMODULE += periph_common
export USEPKG += tlsf
8 changes: 7 additions & 1 deletion cpu/x86/x86_reboot.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 8c8ce5a

Please sign in to comment.