C# Class Rasp_Final.nRF

Exibir arquivo Open project: iamelectron/RaspberryP2_Automation Class Usage Examples

Public Methods

Method Description
Flush_RX ( ) : void

Clear RX Buffer

Flush_TX ( ) : void

Clear TX Buffer

RX_MODE ( ) : void

Switch nRF mode to Receiver (Full duplex communication is not possible) [Half duplex mode only]

RX_PAYLOAD ( ) : byte[]

Transmit payload

SPI_READ ( ) : byte[]

Read Byte array from nRF device (Don't call this function unless you know what you are really doing) You need to write RX_PAYLOAD before bulk reading.

SPI_WRITE ( byte data ) : void

Write Byte stream to nRF device

TX_MODE ( ) : void

Switch nRF mode to Transmitter (Full duplex communication is not possible) [Half duplex mode only]

TX_PAYLOAD ( byte data ) : void

Transmit payload before transmission, switch to TX_MODE()

init_nRF ( ) : void

Initialize nRF module Pipe 0 and Pipe 1 with no ack This init can be replaced with user required initializations for complex wireless operations

is_data_available ( ) : bool

I used another cus

nRF ( Windows.Devices.Gpio.GpioPin nrf_ce, Windows.Devices.Spi.SpiDevice SPI_DEV ) : System

nRF Hardware Init Function

Private Methods

Method Description
high_reset ( ) : void
low_reset ( ) : void

Method Details

Flush_RX() public method

Clear RX Buffer
public Flush_RX ( ) : void
return void

Flush_TX() public method

Clear TX Buffer
public Flush_TX ( ) : void
return void

RX_MODE() public method

Switch nRF mode to Receiver (Full duplex communication is not possible) [Half duplex mode only]
public RX_MODE ( ) : void
return void

RX_PAYLOAD() public method

Transmit payload
public RX_PAYLOAD ( ) : byte[]
return byte[]

SPI_READ() public method

Read Byte array from nRF device (Don't call this function unless you know what you are really doing) You need to write RX_PAYLOAD before bulk reading.
public SPI_READ ( ) : byte[]
return byte[]

SPI_WRITE() public method

Write Byte stream to nRF device
public SPI_WRITE ( byte data ) : void
data byte Byte data array
return void

TX_MODE() public method

Switch nRF mode to Transmitter (Full duplex communication is not possible) [Half duplex mode only]
public TX_MODE ( ) : void
return void

TX_PAYLOAD() public method

Transmit payload before transmission, switch to TX_MODE()
public TX_PAYLOAD ( byte data ) : void
data byte byte data array
return void

init_nRF() public method

Initialize nRF module Pipe 0 and Pipe 1 with no ack This init can be replaced with user required initializations for complex wireless operations
public init_nRF ( ) : void
return void

is_data_available() public method

I used another cus
public is_data_available ( ) : bool
return bool

nRF() public method

nRF Hardware Init Function
public nRF ( Windows.Devices.Gpio.GpioPin nrf_ce, Windows.Devices.Spi.SpiDevice SPI_DEV ) : System
nrf_ce Windows.Devices.Gpio.GpioPin nRF CE PIN
SPI_DEV Windows.Devices.Spi.SpiDevice SPI Device object of Raspberry Pi
return System