update gate interface for new protected port functionality
This commit is contained in:
parent
1dce343c87
commit
1b7915de4c
20
sim/gate.lua
20
sim/gate.lua
@ -16,10 +16,30 @@ function Gate:addport(port)
|
||||
port.gate = self
|
||||
end
|
||||
|
||||
function Gate:getportstate(index)
|
||||
return self.ports[index].state
|
||||
end
|
||||
|
||||
function Gate:setportstate(index, state)
|
||||
self.ports[index]:setstate(state)
|
||||
end
|
||||
|
||||
function Gate:initdata()
|
||||
self.data = {}
|
||||
end
|
||||
|
||||
function Gate:getdata()
|
||||
return self.data
|
||||
end
|
||||
|
||||
function Gate:getportisrising(index)
|
||||
return self.ports[index]:isrising()
|
||||
end
|
||||
|
||||
function Gate:getportisfalling(index)
|
||||
return self.ports[index]:isfalling()
|
||||
end
|
||||
|
||||
-- function Gate:cb(...)
|
||||
-- local args = {...}
|
||||
-- local str = tostring(#args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user