Commit 1915714b authored by devsaurus's avatar devsaurus
Browse files

update ws2812_compat.lua

parent 2acfa53e
...@@ -23,10 +23,6 @@ local _ws2812 ...@@ -23,10 +23,6 @@ local _ws2812
-- Implement esp8266 compatability API -- Implement esp8266 compatability API
-- --
function M.init(mode) function M.init(mode)
if _pin_strip1 == nil then
error("gpio for data1 undefined")
end
if _pin_strip2 == nil and mode == M.MODE_DUAL then if _pin_strip2 == nil and mode == M.MODE_DUAL then
error("gpio for data2 undefined") error("gpio for data2 undefined")
end end
...@@ -66,9 +62,8 @@ return function (pin_strip1, pin_strip2) ...@@ -66,9 +62,8 @@ return function (pin_strip1, pin_strip2)
M.SHIFT_LOGICAL = _ws2812.SHIFT_LOGICAL M.SHIFT_LOGICAL = _ws2812.SHIFT_LOGICAL
M.SHIFT_CIRCULAR = _ws2812.SHIFT_CIRCULAR M.SHIFT_CIRCULAR = _ws2812.SHIFT_CIRCULAR
_pin_strip1 = pin_strip1 _pin_strip1 = pin_strip1 or error("pin_strip1 not defined")
_pin_strip2 = pin_strip2 _pin_strip2 = pin_strip2
return M return M
end end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment