repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[mTask.git]
/
int
/
int.c
diff --git
a/int/int.c
b/int/int.c
index
89dcd0d
..
a946908
100644
(file)
--- a/
int/int.c
+++ b/
int/int.c
@@
-1,4
+1,5
@@
#include <stdio.h>
#include <stdio.h>
+#include <stdbool.h>
#include "mTaskSymbols.h"
#include "mTaskSymbols.h"
@@
-17,6
+18,18
@@
char program[PROGRAMSIZE+1] = {0};
int stack[STACKSIZE+1] = {0};
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;
int main(void)
{
char c;
@@
-120,6
+133,11
@@
int main(void)
case BCSERIALPARSEINT:
printf("SerialParseInt()\n");
break;
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]);
}
default:
die("Unrecognized command: %X\n", program[--pc]);
}