#include <stdlib.h>
#include <string.h>
-#ifndef STM
+#ifdef STM
+#else
#include <stdio.h>
#endif
//Find next task
if(input_available()){
uint8_t c = read_byte();
+ uint8_t ct;
debug("Receiving input: %c %02x\n", c, c);
switch(c){
case MSG_SDS_SPEC:
break;
case MSG_GET_TASK:
debug("Receiving a task");
- // write_dpin(0, true);
- task_register();
- // write_dpin(0, false);
+ ct = task_register();
+ write_byte('t');
+ write_byte(ct+'0');
+ write_byte('\n');
break;
case '\0':
break;
setup();
sds_init();
task_init();
-
- debug("booting up");
+ //debug("booting up");
while(true){
//Check for newetasks
// debug("loop");
loop();
- delay(100);
+ delay(50);
}
return 0;
}