altos: Allow application-specific prompts for ao_cmd_readline
[fw/altos] / src / kernel / ao.h
index fd1d12765a5d3513240514f8184b18cf00fd779b..08e908391bc6e4736a6ee85ed09ecb399fa79f2b 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stddef.h>
+#include <stdbool.h>
 #include <ao_pins.h>
 #include <ao_arch.h>
 
@@ -35,9 +36,6 @@
 extern int ao_putchar(char c);
 extern char ao_getchar(void);
 
-#define TRUE 1
-#define FALSE 0
-
 #ifndef HAS_TASK
 #define HAS_TASK       1
 #endif
@@ -160,8 +158,6 @@ enum ao_cmd_status {
        ao_cmd_syntax_error = 2,
 };
 
-extern uint16_t ao_cmd_lex_i;
-extern uint32_t ao_cmd_lex_u32;
 extern char    ao_cmd_lex_c;
 extern enum ao_cmd_status ao_cmd_status;
 
@@ -169,7 +165,7 @@ void
 ao_put_string(const char *s);
 
 void
-ao_cmd_readline(void);
+ao_cmd_readline(const char *prompt);
 
 char
 ao_cmd_lex(void);
@@ -189,13 +185,13 @@ ao_cmd_white(void);
 int8_t
 ao_cmd_hexchar(char c);
 
-void
+uint8_t
 ao_cmd_hexbyte(void);
 
-void
+uint32_t
 ao_cmd_hex(void);
 
-void
+uint32_t
 ao_cmd_decimal(void);
 
 /* Read a single hex nibble off stdin. */