[ion] Share the Ion::Power::suspend stub

Change-Id: I6a278547a5b5d5caec796ad53e88bca706cbcad3
This commit is contained in:
Romain Goyet
2017-01-25 11:04:29 +01:00
parent caea1fe4cb
commit a56a2a060e
6 changed files with 26 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
#include "apps_container.h"
#include <ion.h>
extern "C" {
#include <assert.h>
}
@@ -51,5 +52,8 @@ bool AppsContainer::handleEvent(Ion::Events::Event event) {
switchTo(appAtIndex(0));
return true;
}
if (event == Ion::Events::OnOff) {
Ion::Power::suspend();
}
return false;
}

View File

@@ -1,5 +1,5 @@
include ion/src/shared/Makefile
include ion/src/device/boot/Makefile
objs += $(addprefix ion/src/device/, \
backlight.o \
battery.o\
@@ -11,6 +11,11 @@ objs += $(addprefix ion/src/device/, \
sd_card.o\
)
objs += $(addprefix ion/src/shared/, \
events.o \
events_from_keyboard.o \
)
# When using the register.h C++ file in production mode, we expect the compiler
# to completely inline all bit manipulations. For some reason, if we build using
# the -Os optimization flag, GCC doesn't inline everything and and ends up

View File

@@ -1,7 +1,9 @@
#include ion/src/shared/Makefile
objs += $(addprefix ion/src/emscripten/, \
main.o\
)
objs += ion/src/shared/events.o
objs += $(addprefix ion/src/shared/, \
crc32.o \
events.o \
power.o \
)

View File

@@ -1,4 +0,0 @@
objs += $(addprefix ion/src/shared/,\
events.o\
events_from_keyboard.o\
)

4
ion/src/shared/power.cpp Normal file
View File

@@ -0,0 +1,4 @@
#include <ion.h>
void Ion::Power::suspend() {
}

View File

@@ -1,16 +1,18 @@
include ion/src/shared/Makefile
objs += $(addprefix ion/src/simulator/, \
battery.o\
init.o\
)
objs += $(addprefix ion/src/shared/, \
crc32.o\
)
objs += $(addprefix ion/src/simulator/boot/, main.o)
objs += $(addprefix ion/src/simulator/display/, fltklcd.o)
objs += $(addprefix ion/src/simulator/keyboard/, fltkkbd.o)
objs += $(addprefix ion/src/shared/, \
crc32.o \
events.o \
events_from_keyboard.o \
power.o \
)
SFLAGS += `fltk-config --cflags`
LDFLAGS += `fltk-config --ldflags`