[ion] Boot on the bench if keys A1 and I5 are pressed after reset

Change-Id: I292a3c1061c20ee5834e27dcc93ea2da65f6cabe
This commit is contained in:
Romain Goyet
2017-03-16 14:55:01 +01:00
parent 9e3c052830
commit dd8ffaabd5
3 changed files with 21 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
#include "bench.h"
#include <ion.h>
#include "command_list.h"

View File

@@ -0,0 +1,14 @@
#ifndef ION_DEVICE_BENCH_BENCH_H
#define ION_DEVICE_BENCH_BENCH_H
namespace Ion {
namespace Device {
namespace Bench {
void run();
}
}
}
#endif

View File

@@ -5,6 +5,7 @@ extern "C" {
#include <string.h>
#include <ion.h>
#include "../device.h"
#include "../bench/bench.h"
typedef void (*cxx_constructor)();
@@ -60,6 +61,11 @@ void start() {
Ion::Device::init();
if (Ion::Keyboard::keyDown(Ion::Keyboard::Key::A1) &&
Ion::Keyboard::keyDown(Ion::Keyboard::Key::I5)) {
Ion::Device::Bench::run();
}
ion_app();
abort();