diff --git a/src/energenie/drv/radio.c b/src/energenie/drv/radio.c index af3238c..e870262 100644 --- a/src/energenie/drv/radio.c +++ b/src/energenie/drv/radio.c @@ -276,6 +276,25 @@ // Send a payload of data //TODO: Rewrite this to use FIFOLEV and FIFOEMPTY with payloadlen=0 //rather than PACKETSENT, as it will allow any number of repeats. +// + +/* NEW DESIGN + + CONFIGURE + set packetlen=0 (arbitrary length) + set fifolevel=payloadlen-1 + set txcondition=fifolevel + + TRANSMIT PAYLOAD + fifo burst a single payload into fifo + + WAIT NEXT + wait for fifolev interrupt flag to be set + + WAIT FINISHED + wait for fifoempty interrupt flag to be set + (wait 1 byte * bps to ensure last byte transmitted) +*/ void radio_send_payload(uint8_t* payload, uint8_t len, uint8_t repeats) {