Use a single Platform global

This commit is contained in:
Romain Goyet
2015-05-24 21:42:49 +02:00
parent f5e3032100
commit a7d3e8e6c9
8 changed files with 175 additions and 36 deletions

View File

@@ -2,11 +2,20 @@ extern "C" {
#include "hello.h"
#include <kandinsky.h>
#include <malloc.h>
#include <platform/stm32f429/init_kbd.h>
}
#include <poincare.h>
void hello() {
/*char letter = 'Z';
while (1) {
letter = getc();
}
*/
KDFillRect((KDRect){
.x = 0,
.y = 0,
@@ -20,6 +29,8 @@ void hello() {
KDDrawString("Hello, world", (KDPoint){});
*/
/*
Number n1 = Number(123);
Number n2 = Number(45);
@@ -38,7 +49,34 @@ void hello() {
free(bar);
free(test);
*/
/*
while (1) {
char character = getc();
KDDrawChar(character, (KDPoint){.x = 0, .y = 0});
}
*/
char input[255];
int index = 0;
while (1) {
char character = getc();
if (character == 'X') {
input[index] = 0;
index = 0;
CreateFromString(input);
} else {
input[index++] = character;
input[index] = 0;
KDDrawString(input, (KDPoint){.x = 0, .y = 0});
}
}
/*
char * input = "12/34/8787/29292929";
CreateFromString(input);
*/
}