mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ION] Simulator keyboard uses C++
This commit is contained in:
@@ -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;
|
||||
}
|
||||
19
ion/platform/simulator/keyboard.cpp
Normal file
19
ion/platform/simulator/keyboard.cpp
Normal 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';
|
||||
}
|
||||
Reference in New Issue
Block a user