altos: Switch to newlib-nano for libc on arm
[fw/altos] / src / lambdakey-v1.0 / ao_lambdakey.c
index 73962e29b36fc3006992ba1b22ab381b2db1e080..a608d8e49c3b90ec58ee0f10adadda3ba7a523b6 100644 (file)
@@ -16,7 +16,7 @@
 #include <ao_scheme.h>
 
 static void scheme_cmd() {
-       ao_scheme_read_eval_print();
+       ao_scheme_read_eval_print(stdin, stdout, false);
 }
 
 static const struct ao_cmds blink_cmds[] = {
@@ -24,10 +24,27 @@ static const struct ao_cmds blink_cmds[] = {
        { 0, 0 }
 };
 
+int
+_ao_scheme_getc(void)
+{
+       static uint8_t  at_eol;
+       int c;
+
+       if (at_eol) {
+               ao_cmd_readline(ao_scheme_read_list ? "Λ " : "λ ");
+               at_eol = 0;
+       }
+       c = (unsigned char) ao_cmd_lex();
+       if (c == '\n')
+               at_eol = 1;
+       return c;
+}
 
 void main(void)
 {
+#ifdef LEDS_AVAILABLE
        ao_led_init(LEDS_AVAILABLE);
+#endif
        ao_clock_init();
        ao_timer_init();
        ao_usb_init();