3-phase PV router
Loading...
Searching...
No Matches
utils_rf.h
Go to the documentation of this file.
1
12#ifndef _UTILS_RF_H
13#define _UTILS_RF_H
14
15#ifdef RF_PRESENT
16#include <JeeLib.h>
17
18inline constexpr bool RF_CHIP_PRESENT{ true };
19
26inline void send_rf_data()
27{
28 // check whether it's ready to send, and an exit route if it gets stuck
29 uint32_t i = 0;
30 while (!rf12_canSend() && i < 10)
31 {
32 rf12_recvDone();
33 ++i;
34 }
35 rf12_sendNow(0, &tx_data, sizeof tx_data);
36}
37#else
38inline constexpr bool RF_CHIP_PRESENT{ false };
39#endif // RF_PRESENT
40
41#endif // _UTILS_RF_H
PayloadTx_struct< NO_OF_PHASES > tx_data
Definition: processing.h:50
uint8_t i
Definition: test_main.cpp:94
void send_rf_data()
Send the logging data through RF.
Definition: utils_rf.h:26
constexpr bool RF_CHIP_PRESENT
Definition: utils_rf.h:18