# HAL Ringbuffer demo to work with zmqringpub.py and zmqringsub.py

newring test 16384

loadrt ringwrite ring=test

# slow square signal on ringwrite.write
# every edge on ringwrite.write causes a message to be queued
loadrt charge_pump
net square-wave charge_pump.0.out ringwrite.write

# 0.5s
newthread slow 500000000

# the 'enqueue a message' function
addf ringwrite slow

addf charge_pump.0 slow
start

# get going
setp charge_pump.0.enable 1
