C# 클래스 Gralin.NETMF.Nordic.NRF24L01Plus

Driver class for Nordic nRF24L01+ tranceiver
파일 보기 프로젝트 열기: GerardSoleCa/IOSharp-netmf-Linux 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
_def_rx_addr_p0 byte[]
_def_rx_addr_p1 byte[]
_def_rx_addr_p2 byte[]
_def_rx_addr_p3 byte[]
_def_rx_addr_p4 byte[]
_def_rx_addr_p5 byte[]
slot AddressSlot[]

공개 메소드들

메소드 설명
Configure ( byte address, byte channel ) : void

Configure the module basic settings. Module needs to be initiaized.

Disable ( ) : void

Disables the module

DisableAA ( AddressSlot s ) : void

Disables the auto-auknowledge for a specific module address slot

DisableRX ( AddressSlot s ) : void

Disables a specific module address slot for reception

Enable ( ) : void

Enables the module

EnableAA ( AddressSlot s ) : void

Enables the auto-auknowledge for a specific module address slot

EnableRX ( AddressSlot s ) : void

Enables a specific module address slot for reception

Execute ( byte command, byte addres, byte data ) : byte[]

Executes a command in NRF24L01+ (for details see module datasheet)

GetAddress ( AddressSlot slot, int width ) : byte[]

Read 1 of 6 available module addresses

GetChannel ( ) : byte

Reads the current rf channel value set in module

GetDefaultAddress ( AddressSlot s ) : byte[]
GetFrequency ( ) : int

Gets the module radio frequency [MHz]

GetStatus ( ) : Status

Gets module basic status information

Initialize ( DriverExpand.SPI spi, DriverExpand.OutputPort chipEnablePin, InterruptPort interruptPort ) : void

Initializes SPI connection and control pins

NRF24L01Plus ( ) : System
SendTo ( byte address, byte bytes, int timeout ) : bool

Sends bytes to given address This is a blocking method that returns true if data was received by the recipient or false if timeout occured.

SendTo ( byte address, byte bytes ) : void

Send bytes to given address This is a non blocking method.

SetAddress ( AddressSlot s, byte address, bool EN_AA ) : void

Set one of 6 available module addresses and enables it when in RX mode, sets also auto-ack if EN_AA is true

SetChannel ( byte channel ) : void

Sets the rf channel value used by all data pipes

SetFixedPayload ( int size ) : void

Sets fixed payload paquets of size bytes weitdh.

SetToDefaultAddress ( AddressSlot s ) : void

Set one of 6 available module addresses to its default value and disables it

비공개 메소드들

메소드 설명
CheckIsInitialized ( ) : void
HandleInterrupt ( uint data1, uint data2, System.DateTime dateTime ) : void

returns the first free pipe loacted or 9 if there are not free pipes available

SetDisabled ( ) : void
SetEnabled ( ) : void
SetReceiveMode ( ) : void
SetTransmitMode ( ) : void
equals ( byte a1, byte a2 ) : bool

메소드 상세

Configure() 공개 메소드

Configure the module basic settings. Module needs to be initiaized.
public Configure ( byte address, byte channel ) : void
address byte RF address (3-5 bytes). The width of this address determins the width of all addresses used for sending/receiving.
channel byte RF channel (0-127)
리턴 void

Disable() 공개 메소드

Disables the module
public Disable ( ) : void
리턴 void

DisableAA() 공개 메소드

Disables the auto-auknowledge for a specific module address slot
public DisableAA ( AddressSlot s ) : void
s AddressSlot
리턴 void

DisableRX() 공개 메소드

Disables a specific module address slot for reception
public DisableRX ( AddressSlot s ) : void
s AddressSlot
리턴 void

Enable() 공개 메소드

Enables the module
public Enable ( ) : void
리턴 void

EnableAA() 공개 메소드

Enables the auto-auknowledge for a specific module address slot
public EnableAA ( AddressSlot s ) : void
s AddressSlot
리턴 void

EnableRX() 공개 메소드

Enables a specific module address slot for reception
public EnableRX ( AddressSlot s ) : void
s AddressSlot
리턴 void

Execute() 공개 메소드

Executes a command in NRF24L01+ (for details see module datasheet)
public Execute ( byte command, byte addres, byte data ) : byte[]
command byte Command
addres byte Register to write to
data byte Data to write
리턴 byte[]

GetAddress() 공개 메소드

Read 1 of 6 available module addresses
public GetAddress ( AddressSlot slot, int width ) : byte[]
slot AddressSlot
width int
리턴 byte[]

GetChannel() 공개 메소드

Reads the current rf channel value set in module
public GetChannel ( ) : byte
리턴 byte

GetDefaultAddress() 공개 메소드

public GetDefaultAddress ( AddressSlot s ) : byte[]
s AddressSlot
리턴 byte[]

GetFrequency() 공개 메소드

Gets the module radio frequency [MHz]
public GetFrequency ( ) : int
리턴 int

GetStatus() 공개 메소드

Gets module basic status information
public GetStatus ( ) : Status
리턴 Status

Initialize() 공개 메소드

Initializes SPI connection and control pins
public Initialize ( DriverExpand.SPI spi, DriverExpand.OutputPort chipEnablePin, InterruptPort interruptPort ) : void
spi DriverExpand.SPI
chipEnablePin DriverExpand.OutputPort
interruptPort Microsoft.SPOT.Hardware.InterruptPort
리턴 void

NRF24L01Plus() 공개 메소드

public NRF24L01Plus ( ) : System
리턴 System

SendTo() 공개 메소드

Sends bytes to given address This is a blocking method that returns true if data was received by the recipient or false if timeout occured.
public SendTo ( byte address, byte bytes, int timeout ) : bool
address byte
bytes byte
timeout int
리턴 bool

SendTo() 공개 메소드

Send bytes to given address This is a non blocking method.
public SendTo ( byte address, byte bytes ) : void
address byte
bytes byte
리턴 void

SetAddress() 공개 메소드

Set one of 6 available module addresses and enables it when in RX mode, sets also auto-ack if EN_AA is true
public SetAddress ( AddressSlot s, byte address, bool EN_AA ) : void
s AddressSlot
address byte
EN_AA bool
리턴 void

SetChannel() 공개 메소드

Sets the rf channel value used by all data pipes
public SetChannel ( byte channel ) : void
channel byte 7 bit channel value
리턴 void

SetFixedPayload() 공개 메소드

Sets fixed payload paquets of size bytes weitdh.
public SetFixedPayload ( int size ) : void
size int
리턴 void

SetToDefaultAddress() 공개 메소드

Set one of 6 available module addresses to its default value and disables it
public SetToDefaultAddress ( AddressSlot s ) : void
s AddressSlot
리턴 void

프로퍼티 상세

_def_rx_addr_p0 공개적으로 프로퍼티

public byte[] _def_rx_addr_p0
리턴 byte[]

_def_rx_addr_p1 공개적으로 프로퍼티

public byte[] _def_rx_addr_p1
리턴 byte[]

_def_rx_addr_p2 공개적으로 프로퍼티

public byte[] _def_rx_addr_p2
리턴 byte[]

_def_rx_addr_p3 공개적으로 프로퍼티

public byte[] _def_rx_addr_p3
리턴 byte[]

_def_rx_addr_p4 공개적으로 프로퍼티

public byte[] _def_rx_addr_p4
리턴 byte[]

_def_rx_addr_p5 공개적으로 프로퍼티

public byte[] _def_rx_addr_p5
리턴 byte[]

slot 공개적으로 프로퍼티

public AddressSlot[] slot
리턴 AddressSlot[]