Module: Denko::Behaviors::BusPeripheral

Includes:
Component, Lifecycle
Included in:
BusPeripheralAddressed, Display::MonoOLED, LED::APA102, SPI::Peripheral
Defined in:
lib/denko/behaviors/bus_peripheral.rb

Constant Summary

Constants included from Lifecycle

Lifecycle::CALLBACK_METHODS

Instance Attribute Summary

Attributes included from Component

#board, #params

Attributes included from State

#state

Instance Method Summary collapse

Methods included from Lifecycle

included

Methods included from Component

#initialize, #micro_delay

Methods included from State

#update_state

Instance Method Details

#atomically(&block) ⇒ Object



13
14
15
16
17
# File 'lib/denko/behaviors/bus_peripheral.rb', line 13

def atomically(&block)
  bus.mutex.synchronize do
    block.call
  end
end