.
[mTask.git] / int / int.c
index 89dcd0d..a946908 100644 (file)
--- a/int/int.c
+++ b/int/int.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdbool.h>
 
 #include "mTaskSymbols.h"
 
 char program[PROGRAMSIZE+1] = {0};
 int stack[STACKSIZE+1] = {0};
 
+bool input_available(){
+       struct timeval tv;
+       fd_set fds;
+       tv.tv_sec = 0;
+       tv.tv_usec = 0;
+       FD_ZERO(&fds);
+       FD_SET(0, &fds);
+       select(1, &fds, NULL, NULL, &tv);
+       return FD_ISSET(0, &fds);
+}
+
+
 int main(void)
 {
        char c;
@@ -120,6 +133,11 @@ int main(void)
                case BCSERIALPARSEINT:
                        printf("SerialParseInt()\n");
                        break;
+               case BCANALOGREAD:
+                       printf("AnalogRead()\n");
+                       break;
+               case BCANALOGWRITE:
+                       printf("AnalogWrite()\n");
                default:
                        die("Unrecognized command: %X\n", program[--pc]);
                }