require"pincfg"
module(...,package.seeall)

--[[
print
  ӡӿڣļедӡtestǰ׺
  
ֵ
]]
local function print(...)
	_G.print("test",...)
end

-------------------------PIN8Կʼ-------------------------
local pin8flg = true
--[[
pin8set
  PIN8ŵƽ1뷴תһ
  
ֵ
]]
local function pin8set()
	pins.set(pin8flg,pincfg.PIN8)
	pin8flg = not pin8flg
end
--1ѭʱPIN8ŵƽ
sys.timer_loop_start(pin8set,1000)
-------------------------PIN8Խ-------------------------


-------------------------PIN9Կʼ-------------------------
local pin9flg = true
--[[
pin9set
  PIN9ŵƽ1뷴תһ
  
ֵ
]]
local function pin9set()
	pins.set(pin9flg,pincfg.PIN9)
	pin9flg = not pin9flg
end
--1ѭʱPIN9ŵƽ
sys.timer_loop_start(pin9set,1000)
-------------------------PIN9Խ-------------------------


-------------------------PIN28Կʼ-------------------------
--[[
pin28get
  ȡPIN28ŵƽ
  
ֵ
]]
local function pin28get()
	local v = pins.get(pincfg.PIN28)
	print("pin28get",v and "low" or "high")
end
--1ѭʱȡPIN28ŵƽ
sys.timer_loop_start(pin28get,1000)
-------------------------PIN28Խ-------------------------
