upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the NRF24L01 Transceiver Module. More...
id This module defines the NRF24L01 interface for libnrf24l01
Public Member Functions | |
synchronized void | delete () |
NRF24L01 (short cs, short ce) | |
String | name () |
void | init (short chipSelect, short chipEnable) |
void | configure () |
void | send (byte[] value) |
void | send () |
void | setSourceAddress (byte[] addr) |
void | setDestinationAddress (byte[] addr) |
void | setBroadcastAddress (byte[] addr) |
void | setPayload (short load) |
void | setDataReceivedHandler (Callback call_obj) |
boolean | dataReady () |
boolean | dataSending () |
void | getData (byte[] data) |
short | getStatus () |
boolean | rxFifoEmpty () |
void | rxPowerUp () |
void | rxFlushBuffer () |
void | txPowerUp () |
void | powerDown () |
void | setChannel (short channel) |
void | setPower (power_t power) |
short | setSpeedRate (speed_rate_t rate) |
void | txFlushBuffer () |
void | pollListener () |
int | ceHigh () |
int | ceLow () |
int | csOn () |
int | csOff () |
void | setBeaconingMode () |
void | sendBeaconingMsg (byte[] msg) |
void | setM_rxBuffer (short[] value) |
short[] | getM_rxBuffer () |
void | setM_txBuffer (short[] value) |
short[] | getM_txBuffer () |
void | setM_bleBuffer (short[] value) |
short[] | getM_bleBuffer () |
NRF24L01 | ( | short | cs, |
short | ce | ||
) |
Instantiates an NRF24l01 object
cs | Chip select pin |
int ceHigh | ( | ) |
Sets the chip enable pin to HIGH
int ceLow | ( | ) |
Sets the chip enable pin to LOW
void configure | ( | ) |
Configures the NRF24L01 transceiver
int csOff | ( | ) |
Sets the chip select pin to HIGH
int csOn | ( | ) |
Sets the chip select pin to LOW
boolean dataReady | ( | ) |
Checks if the data has arrived
boolean dataSending | ( | ) |
Checks if the transceiver is in the sending mode
void getData | ( | byte[] | data | ) |
Sinks all the arrived data into a provided buffer
load | Size of the payload (MAX 32) |
short getStatus | ( | ) |
Checks the transceiver state
void init | ( | short | chipSelect, |
short | chipEnable | ||
) |
Initializes needed GPIO pins and SPI
chipSelect | Sets up the chip select pin |
chipEnable | Sets up the chip enable pin |
String name | ( | ) |
Returns the name of the component
void pollListener | ( | ) |
Pulling the method listening for the arrived data, dataRecievedHandler is triggered if data arrives
void powerDown | ( | ) |
Powers everything down
boolean rxFifoEmpty | ( | ) |
Checks if the receive stack is empty
void rxFlushBuffer | ( | ) |
Flushes the receive stack
void rxPowerUp | ( | ) |
Powers the receiver up
void send | ( | byte[] | value | ) |
Sends the buffer data
*value | Pointer to the buffer |
void send | ( | ) |
Sends the data located in an inner bufer; the user must fill the m_txBuffer buffer
void sendBeaconingMsg | ( | byte[] | msg | ) |
Beacons the provided message to BLE scanners.
msg | Beacons the provided message (max length is 16 bytes) |
void setBeaconingMode | ( | ) |
Configures the NRF24L01 transceiver to behave as a BLE (Bluetooth Low Energy) beaconing devcie.
void setBroadcastAddress | ( | byte[] | addr | ) |
Sets a broadcasting address
addr | 5-byte address |
void setDataReceivedHandler | ( | Callback | call_obj | ) |
Sets the handler to be called when data has been received
call_obj | Object used for callback - Java |
void setDestinationAddress | ( | byte[] | addr | ) |
Sets a recipient address. The nrfSend method sends the data buffer to this address
addr | 5-byte address |
void setPayload | ( | short | load | ) |
Sets the payload size
load | Size of the payload (MAX 32) |
void setSourceAddress | ( | byte[] | addr | ) |
Sets a receiving address of the device
addr | 5-byte address |
void txFlushBuffer | ( | ) |
Flushes the transmit stack
void txPowerUp | ( | ) |
Powers the transmitter up