projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32f1: Support beeper on tim3
[fw/altos]
/
src
/
lambdakey-v1.0
/
ao_lambdakey.c
diff --git
a/src/lambdakey-v1.0/ao_lambdakey.c
b/src/lambdakey-v1.0/ao_lambdakey.c
index 8bd344cf57139fe47f9264e7e2f6cf6514e34e2a..c50317c01a5fbea013257bcc1b292cdd729252e2 100644
(file)
--- a/
src/lambdakey-v1.0/ao_lambdakey.c
+++ b/
src/lambdakey-v1.0/ao_lambdakey.c
@@
-13,29
+13,44
@@
*/
#include <ao.h>
*/
#include <ao.h>
-#include <ao_
lisp
.h>
+#include <ao_
scheme
.h>
-static void
lisp_cmd(
) {
- ao_
lisp_read_eval_print(
);
+static void
scheme_cmd(void
) {
+ ao_
scheme_read_eval_print(stdin, stdout, false
);
}
static const struct ao_cmds blink_cmds[] = {
}
static const struct ao_cmds blink_cmds[] = {
- {
lisp_cmd, "l\0Run lisp
interpreter" },
+ {
scheme_cmd, "l\0Run scheme
interpreter" },
{ 0, 0 }
};
{ 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)
{
void main(void)
{
- ao_led_init(LEDS_AVAILABLE);
+#ifdef LEDS_AVAILABLE
+ ao_led_init();
+#endif
ao_clock_init();
ao_clock_init();
- ao_task_init();
ao_timer_init();
ao_timer_init();
- ao_dma_init();
ao_usb_init();
ao_cmd_init();
ao_cmd_register(blink_cmds);
ao_usb_init();
ao_cmd_init();
ao_cmd_register(blink_cmds);
- ao_
start_scheduler
();
+ ao_
cmd
();
}
}