embedded-software
reusable software modules for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nrf_example.c File Reference
#include <msp430.h>
#include <stdint.h>
#include "system.h"
#include "nrf24.h"
#include "timing.h"
#include "task.h"
#include "uart.h"
#include "spi.h"
#include "hal_general.h"
Include dependency graph for nrf_example.c:

Macros

#define CHIP1_AND_2
 
#define RF_SPI_CH   SPI_B0
 
#define RF_ADDRESS   0x6C6C6C7828
 

Functions

void SetClk24MHz (void)
 
void SetVcoreUp (unsigned int level)
 
void RF1_CE (uint8_t out)
 
void RF1_CSN (uint8_t out)
 
void RF1_PollIRQ (void)
 
void RF2_CE (uint8_t out)
 
void RF2_CSN (uint8_t out)
 
void RF2_PollIRQ (void)
 
void RF1_Init (void)
 
void RF2_Init (void)
 
void RF1_RxPayloadHandler (uint8_t *data, uint8_t length)
 
void RF1_AckPayloadHandler (uint8_t *data, uint8_t length)
 
void RF1_AckReceivedHandler (void)
 
void RF1_MaxRetriesHandler (void)
 
void RF2_RxPayloadHandler (uint8_t *data, uint8_t length)
 
void RF2_AckPayloadHandler (uint8_t *data, uint8_t length)
 
void RF2_AckReceivedHandler (void)
 
void RF2_MaxRetriesHandler (void)
 
void RF2_AckPayloadSent (void)
 
void RF_Test (void)
 
void WriteAcks (void)
 
int main (void)
 
void RF_TX1 (void)
 
void RF_TX2 (void)
 

Variables

nrf24_t RF1
 
nrf24_t RF2
 
uint8_t tx_buf [13] = {"1Hello RF2\r\n"}
 
uint8_t tx1_buf [13] = {"2Hello RF2\r\n"}
 
uint8_t tx2_buf [13] = {"3Hello RF2\r\n"}
 
uint8_t retry_buf [15] = {"Hello Retry!\r\n"}
 
uint8_t ack_buf [10] = {"Hi RF1!\r\n"}
 
uint32_t payload1_rx = 0
 
uint32_t ack1_rx = 0
 
uint32_t payload2_rx = 0
 

Macro Definition Documentation

#define CHIP1_AND_2
#define RF_ADDRESS   0x6C6C6C7828
#define RF_SPI_CH   SPI_B0

Function Documentation

int main ( void  )

Here is the call graph for this function:

void RF1_AckPayloadHandler ( uint8_t *  data,
uint8_t  length 
)

Here is the caller graph for this function:

void RF1_AckReceivedHandler ( void  )

Here is the caller graph for this function:

void RF1_CE ( uint8_t  out)

Here is the caller graph for this function:

void RF1_CSN ( uint8_t  out)

Here is the caller graph for this function:

void RF1_Init ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF1_MaxRetriesHandler ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF1_PollIRQ ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF1_RxPayloadHandler ( uint8_t *  data,
uint8_t  length 
)

Here is the caller graph for this function:

void RF2_AckPayloadHandler ( uint8_t *  data,
uint8_t  length 
)

Here is the caller graph for this function:

void RF2_AckPayloadSent ( void  )

Here is the caller graph for this function:

void RF2_AckReceivedHandler ( void  )

Here is the caller graph for this function:

void RF2_CE ( uint8_t  out)

Here is the caller graph for this function:

void RF2_CSN ( uint8_t  out)

Here is the caller graph for this function:

void RF2_Init ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF2_MaxRetriesHandler ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF2_PollIRQ ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF2_RxPayloadHandler ( uint8_t *  data,
uint8_t  length 
)

Here is the caller graph for this function:

void RF_Test ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF_TX1 ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void RF_TX2 ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void SetClk24MHz ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

void SetVcoreUp ( unsigned int  level)

Here is the caller graph for this function:

void WriteAcks ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

uint32_t ack1_rx = 0
uint8_t ack_buf[10] = {"Hi RF1!\r\n"}
uint32_t payload1_rx = 0
uint32_t payload2_rx = 0
uint8_t retry_buf[15] = {"Hello Retry!\r\n"}
nrf24_t RF1
nrf24_t RF2
uint8_t tx1_buf[13] = {"2Hello RF2\r\n"}
uint8_t tx2_buf[13] = {"3Hello RF2\r\n"}
uint8_t tx_buf[13] = {"1Hello RF2\r\n"}