Ny structure. Start of the "main" branch
This commit is contained in:
21
Cards/EaserCAT-2000/linuxcnc/metalmusings_encoder.comp
Normal file
21
Cards/EaserCAT-2000/linuxcnc/metalmusings_encoder.comp
Normal file
@@ -0,0 +1,21 @@
|
||||
component metalmusings_encoder;
|
||||
pin io bit index-c-enable;
|
||||
pin in u32 index-status;
|
||||
pin out u32 index-latch-enable;
|
||||
|
||||
function _;
|
||||
license "GPL";
|
||||
;;
|
||||
|
||||
//main function
|
||||
FUNCTION(_) {
|
||||
index_latch_enable = index_c_enable;
|
||||
if (index_latch_enable) {
|
||||
if (index_status) {
|
||||
index_c_enable = 0;
|
||||
}
|
||||
// else wait for index-status
|
||||
} else {
|
||||
index_c_enable = index_status;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user