[ION] Simulator keyboard uses C++

This commit is contained in:
Romain Goyet
2015-09-01 22:48:47 +02:00
parent e11f6efa94
commit 0f0e1b3d98
2 changed files with 19 additions and 10 deletions

View File

@@ -1,10 +0,0 @@
#include <ion.h>
#include <stdio.h>
char ion_getchar() {
printf("GETCHAR\n");
ion_sleep();
char c = getchar();
printf("Returning %c\n", c);
return c;
}

View File

@@ -0,0 +1,19 @@
extern "C" {
#include <ion.h>
}
#include "platform.h"
bool ion_scankey(ion_key_t key) {
return Platform.keyboard->scankey(key);
}
char ion_getchar() {
printf("GETCHAR\n");
for (int i=0; i<100; i++) {
ion_sleep();
}
//ion_sleep();
//char c = getchar();
//printf("Returning %c\n", c);
return '6';
}