aboutsummaryrefslogtreecommitdiffstats
path: root/creole.c
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-04-07 19:49:53 +0000
committerGravatar Peter McGoron 2023-04-07 19:49:53 +0000
commit56c6523e15176ecb5eadeda803d7e54c165d69ca (patch)
tree72e0432d8574cfa21f64e51af7ebfaecd7b4a50b /creole.c
parentadd adc and dac switch (diff)
rerun test suite
Diffstat (limited to '')
-rw-r--r--creole.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/creole.c b/creole.c
index 474d205..0ade012 100644
--- a/creole.c
+++ b/creole.c
@@ -12,13 +12,15 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
-#include <zephyr/kernel.h>
-#include <zephyr/sys_clock.h>
-#include "creole.h"
-#include "access.h"
-#include "control_loop_cmds.h"
-#include "sock.h"
+#ifndef CREOLE_TEST
+# include <zephyr/kernel.h>
+# include <zephyr/sys_clock.h>
+# include "access.h"
+# include "control_loop_cmds.h"
+# include "sock.h"
+#endif
+#include "creole.h"
/*************************************************************************
* Static information
************************************************************************/
@@ -556,6 +558,8 @@ int creole_jump(struct creole_env *env, creole_word off)
return 1;
}
+#ifndef CREOLE_TEST
+
static size_t
load_into_array(const struct creole_reader *start, creole_word *buf, size_t buflen)
{
@@ -608,6 +612,7 @@ upsilon_senddat(struct creole_env *env, creole_word db)
return sock_write_buf(env->fd, &bp);
}
+#endif /* CREOLE_TEST */
/* Upsilon interface */
@@ -719,6 +724,7 @@ enum creole_run_ret creole_step(struct creole_env *env, creole_word *sc)
return CREOLE_JUMP_OVERFLOW;
break;
+#ifndef CREOLE_TEST
case CREOLE_READ_ADC:
check(read_val(env, &ins, 0, &a0));
@@ -857,6 +863,8 @@ enum creole_run_ret creole_step(struct creole_env *env, creole_word *sc)
check(creole_push(env, dac_switch(a0, a1, K_FOREVER)));
break;
+#endif /* CREOLE_TEST */
+
default:
rcode = CREOLE_STEP_UNKNOWN_OPCODE;
break;