modm API documentation
modm::Nrf24Data< Nrf24Phy, Clock > Class Template Reference

#include <modm/driver/radio/nrf24/nrf24_data.hpp>

Inheritance diagram for modm::Nrf24Data< Nrf24Phy, Clock >:
modm::Nrf24Register

Classes

struct  Feedback
 
struct  Header
 Header of Frame More...
 
class  Packet
 Data that will be sent over the air More...
 

Public Typedefs

using BaseAddress = uint64_t
 
using Address = uint8_t
 
using Timestamp = modm::Timestamp
 
using ClockLower = Clock
 
using Config = modm::Nrf24Config< Nrf24Phy >
 
using Phy = Nrf24Phy
 

Public Types

enum  SendingFeedback {
  SendingFeedback::Busy, SendingFeedback::FinishedAck, SendingFeedback::FinishedNack, SendingFeedback::DontKnow,
  SendingFeedback::Failed, SendingFeedback::Undefined
}
 

Static Public Member Functions

static const char * toStr (SendingFeedback feedback)
 
static constexpr uint8_t getFrameOverhead ()
 
static uint8_t getDynamicPayloadLength ()
 
static void initialize (BaseAddress base_address, Address own_address, Address broadcast_address=0xFF)
 
static bool sendPacket (Packet &packet)
 
static bool getPacket (Packet &packet)
 
static bool isReadyToSend ()
 
static bool isPacketAvailable ()
 
static const FeedbackgetFeedback ()
 
static void update ()
 Call this function in your main loop.
 
static void interruptHandler ()
 
static Address getAddress ()
 
static void setAddress (Address address)
 Set own address.
 
static void setBroadcastAddress (Address address)
 
static Address getBroadcastAddress ()
 

Detailed Description

template<typename Nrf24Phy, typename Clock = modm::Clock>
class modm::Nrf24Data< Nrf24Phy, Clock >

Author
Daniel Krebs

Member Enumeration Documentation

template<typename Nrf24Phy , typename Clock = modm::Clock>
enum modm::Nrf24Data::SendingFeedback
strong
Enum ValuesDocumentation
Busy 

Waiting for ACK.

FinishedAck 

Packet sent and ACK received.

FinishedNack 

Packet sent but no ACK received in time.

DontKnow 

Packet was sent without requesting ACK.

Failed 

Packet could not be sent.

Undefined 

Initial state before a packet has been handled.

Member Function Documentation

template<typename Nrf24Phy , typename Clock = modm::Clock>
static const Feedback& modm::Nrf24Data< Nrf24Phy, Clock >::getFeedback ( )
inlinestatic

Feedback of last transaction, i.e. calls to sendPacket() and getPacket().

template<typename Nrf24Phy , typename Clock = modm::Clock>
static void modm::Nrf24Data< Nrf24Phy, Clock >::interruptHandler ( )
static

Call this function from within IRQ pin interrupt You have to setup the IRQ pin yourself!


The documentation for this class was generated from the following file: