module NRF24::Bcm2835Driver

Public Instance Methods

ce_high() click to toggle source
# File lib/nrf24/bcm2835_driver.rb, line 14
def ce_high
  Bcm2835::GPIO.set cepin
end
ce_low() click to toggle source
# File lib/nrf24/bcm2835_driver.rb, line 18
def ce_low
  Bcm2835::GPIO.clear cepin
end
csn_high() click to toggle source
# File lib/nrf24/bcm2835_driver.rb, line 22
def csn_high
  Bcm2835::GPIO.set csnpin
end
csn_low() click to toggle source
# File lib/nrf24/bcm2835_driver.rb, line 26
def csn_low
  Bcm2835::GPIO.clear csnpin
end
init_io() click to toggle source
# File lib/nrf24/bcm2835_driver.rb, line 6
def init_io
  @spi = Bcm2835::SPI.begin
  spi.clock Bcm2835::SPI::CLOCK_DIVIDER_128
  spi.bit_order(Bcm2835::SPI::MSBFIRST)
  Bcm2835::GPIO.output cepin
  Bcm2835::GPIO.output csnpin
end