repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added debug statements, dynamic allocation is working for tasks
[mTask.git]
/
client
/
interface.h
diff --git
a/client/interface.h
b/client/interface.h
index
eee3457
..
9e16292
100644
(file)
--- a/
client/interface.h
+++ b/
client/interface.h
@@
-1,6
+1,10
@@
#ifndef INTERFACE_H
#define INTERFACE_H
#ifndef INTERFACE_H
#define INTERFACE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>
@@
-22,6
+26,13
@@
extern char **gargv;
#define HAVEAIO 1
#define HAVEDIO 1
#define HAVEAIO 1
#define HAVEDIO 1
+#elif defined ARDUINO_ESP8266_NODEMCU
+#define MAXTASKS 5
+#define MAXSDSS 100
+#define HAVELED 0
+#define HAVEAIO 0
+#define HAVEDIO 0
+
#else
//Add you device here
#endif
#else
//Add you device here
#endif
@@
-36,23
+47,32
@@
uint8_t read_byte(void);
void write_byte(uint8_t b);
/* Analog and digital pins */
void write_byte(uint8_t b);
/* Analog and digital pins */
+#if HAVEDIO == 1
void write_dpin(uint8_t i, bool b);
bool read_dpin(uint8_t i);
void write_dpin(uint8_t i, bool b);
bool read_dpin(uint8_t i);
+#endif
+#if HAVEAIO == 1
void write_apin(uint8_t i, uint8_t a);
uint8_t read_apin(uint8_t i);
void write_apin(uint8_t i, uint8_t a);
uint8_t read_apin(uint8_t i);
+#endif
/* UserLED */
/* UserLED */
+#if HAVELED == 1
void led_on(uint8_t i);
void led_off(uint8_t i);
void led_on(uint8_t i);
void led_off(uint8_t i);
+#endif
/* Delay and communication */
/* Delay and communication */
-
long
millis(void);
-void
delay(
long ms);
+
unsigned long get
millis(void);
+void
msdelay(unsigned
long ms);
/* Auxilliary */
/* Auxilliary */
-void setup(void);
+void
real_
setup(void);
void debug(char *fmt, ...);
void pdie(char *s);
void die(char *fmt, ...);
void debug(char *fmt, ...);
void pdie(char *s);
void die(char *fmt, ...);
+#ifdef __cplusplus
+}
+#endif
#endif
#endif