Module: Denko::Display::SPIEPaperCommon
Constant Summary collapse
- BUSY_WAIT_TIME =
Defaults. Override in subclasses as needed.
0.005- RESET_TIME =
0.010
Constants included from Behaviors::Lifecycle
Behaviors::Lifecycle::CALLBACK_METHODS
Instance Attribute Summary
Attributes included from SPI::Peripheral
#spi_bit_order, #spi_frequency, #spi_mode
Attributes included from Behaviors::State
Attributes included from Behaviors::Component
Attributes included from Behaviors::MultiPin
Instance Method Summary collapse
Methods included from SPICommon
#command, #data, #transfer_limit
Methods included from PixelCommon
#canvas, #colors, #columns, #draw, #get_partial_buffer, #p_max, #p_min, #refresh, #rows, #x_max, #x_min, #y_max, #y_min
Methods included from SPI::Peripheral
#ensure_byte_array, #proxy_pin, #spi_listen, #spi_read, #spi_stop, #spi_transfer, #spi_write, #update
Methods included from Behaviors::Lifecycle
Methods included from Behaviors::Callbacks
#add_callback, #callbacks, #pre_callback_filter, #remove_callback, #update
Methods included from Behaviors::State
Methods included from Behaviors::BusPeripheral
Methods included from Behaviors::Component
Methods included from Behaviors::MultiPin
#convert_pins, #proxy_pin, #proxy_states, #require_pin, #require_pins
Instance Method Details
#busy_wait ⇒ Object
16 17 18 19 |
# File 'lib/denko/display/spi_epaper_common.rb', line 16 def busy_wait # #read is more compatible than #listen sleep self.class::BUSY_WAIT_TIME while busy.read == 1 end |
#hw_reset ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/denko/display/spi_epaper_common.rb', line 21 def hw_reset if reset reset.low sleep self.class::RESET_TIME reset.high end end |