# test panel for pport
# port at 9c00
# this uses HAL and PyVCP only, no EMC
# crap text schematic.....
# NB: the output is split & hard wired or'ed vvv here
#
# pin signal pin comp pin signal pin
#
# parport.0.pin-11-in-not ------- inhard0------or2.0.in0 /-- fred.led.o
# OR or2.0.out -----myled--------<
# fred.mySoftButton---------------ingui0-------or2.0.in1 \-- parport.0.pin-02-out
#
#
# load parport driver # i think its ok to say "9c00" or to say "0x9c00"
loadrt hal_parport cfg="9c00"
# -Wn is >W<ait for the component >N<amed ...
# -c is for the pyvcp command
# Usage: pyvcp [-c hal_component_name] myfile.xml
# If the component name is not specified, the basename of the xml file is used.
# so BOTH -Wn blah and -c blah should be same
loadusr -Wn fred pyvcp -c fred pp1b1led.xml
# create 1mS realtime threads
loadrt threads name1=thrd1 period1=1000000
#
# add realtime functions to threads
addf parport.0.read thrd1
addf parport.0.write thrd1
#
# ntrcnx
#
loadrt or2 count=1
addf or2.0 thrd1
newsig inhard0 bit
newsig ingui0 bit
linkpp parport.0.pin-11-in-not or2.0.in0
linkpp fred.mySoftButton or2.0.in1
# the 'net' format requires a named signal, it must be 1st,
# and the ==> is not neccesary,
# everything after the 1st arg are pins that are shorted together
# the order of arg 2 thru n is not important
net somesig fred.led.0 or2.0.out parport.0.pin-02-out
start
waitusr fred