crashtest-r0ket/modules/mkwrapper
Stefan `Sec` Zehl 93a5e2696b Enable systick (10ms) by default and allow modules to be called from systick
Also add VoltageCheck once per sec by default
2011-06-13 23:19:18 +02:00

26 lines
355 B
Bash
Executable file

#!/bin/sh
for a in $* ; do
base=${a%.o}
echo "void module_$base(void);"
echo "void tick_$base(void);"
done
echo
echo "void wrapper(void){"
for a in $* ; do
base=${a%.o}
echo "module_$base();"
done
echo "}"
echo "void tick_wrapper(void){"
for a in $* ; do
base=${a%.o}
grep -q \ tick_$base ${base}.c && echo "tick_$base();"
done
echo "}"