rf12_sendStart()
Switch to transmission mode and send a packet. This can be either a request or a reply.
#include <RF12.h>
#include <Ports.h> // needed to avoid a linker error :(
void rf12_sendStart(byte header);
void rf12_sendStart(byte header, const void* data, byte length);
void rf12_sendStart(byte header, const void* data, byte length, byte sync); // deprecated
Parameters
header
The header contains information about the destination of the packet to send, and flags such as whether this should be acknowledged - or if it actually is an acknowledgement.
data
Pointer to the data to send as packet.
length
Number of data bytes to send. Must be in the range 0 .. 65.
sync
Optional: see rf12_sendWait().
Notes
The rf12_sendStart() function may only be called in two very specific situations:
right after rf12_recvDone() returns true - used for sending replies / acknowledgements
right after rf12_canSend() returns true - used to send requests out
Because transmissions may only be started when there is no other reception or transmission taking place.
The short form, i.e. "rf12_sendStart(hdr)" is for a special buffer-less transmit mode, as described in this weblog post.
The call with 4 arguments, i.e. "rf12_sendStart(hdr, data, length, sync)" is deprecated, as described in that same weblog post. The recommended idiom is now to call it with 3 arguments, followed by a call to rf12_sendWait().