Method: Ws2812::Basic#close
- Defined in:
- lib/ws2812/basic.rb
#close ⇒ Object
Closes (deinitializes) communication with the LED strand
Can be called on already closed device just fine
89 90 91 92 93 94 95 96 97 98 |
# File 'lib/ws2812/basic.rb', line 89 def close if @open && @leds @open = false ws2811_fini(@leds) @channel = nil # will GC the memory @leds = nil # Note: ws2811_fini will free mem used by led_data internally end self end |