Import LinuxCNC source tree
This commit is contained in:
2
tests/halcompile/userspace/.gitignore
vendored
Normal file
2
tests/halcompile/userspace/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
rand_test
|
||||
rand_test.comp
|
||||
2
tests/halcompile/userspace/checkresult
Executable file
2
tests/halcompile/userspace/checkresult
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
[ -x "$(dirname "$1")/rand_test" ]
|
||||
15
tests/halcompile/userspace/rand.comp
Normal file
15
tests/halcompile/userspace/rand.comp
Normal file
@@ -0,0 +1,15 @@
|
||||
component rand;
|
||||
option userspace;
|
||||
|
||||
pin out float out;
|
||||
license "GPL";
|
||||
;;
|
||||
#include <unistd.h>
|
||||
|
||||
void user_mainloop(void) {
|
||||
while(1) {
|
||||
usleep(1000);
|
||||
FOR_ALL_INSTS() out = drand48();
|
||||
}
|
||||
}
|
||||
|
||||
2
tests/halcompile/userspace/test.sh
Executable file
2
tests/halcompile/userspace/test.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
halcompile --compile rand_test.comp
|
||||
Reference in New Issue
Block a user