Renamed the rimebuf module to packetbuf to signal that the module is used outside of a pure Rime context (e.g., the sicslowpan code uses it).
This commit is contained in:
parent
932fc9f748
commit
65eb5fd4e8
90 changed files with 690 additions and 687 deletions
|
@ -26,14 +26,14 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: radio-test.c,v 1.4 2008/07/09 21:49:20 nifi Exp $
|
||||
* $Id: radio-test.c,v 1.5 2009/03/12 21:58:21 adamdunkels Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
|
||||
* Created : 2006-03-07
|
||||
* Updated : $Date: 2008/07/09 21:49:20 $
|
||||
* $Revision: 1.4 $
|
||||
* Updated : $Date: 2009/03/12 21:58:21 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* Simple application to indicate connectivity between two nodes:
|
||||
*
|
||||
|
@ -91,14 +91,14 @@ static void
|
|||
abc_recv(struct abc_conn *c)
|
||||
{
|
||||
/* packet received */
|
||||
if(rimebuf_datalen() < PACKET_SIZE
|
||||
|| strncmp((char *)rimebuf_dataptr(), HEADER, sizeof(HEADER))) {
|
||||
if(packetbuf_datalen() < PACKET_SIZE
|
||||
|| strncmp((char *)packetbuf_dataptr(), HEADER, sizeof(HEADER))) {
|
||||
/* invalid message */
|
||||
|
||||
} else {
|
||||
PROCESS_CONTEXT_BEGIN(&radio_test_process);
|
||||
set(&recv, ON);
|
||||
set(&other, ((char *)rimebuf_dataptr())[sizeof(HEADER)] ? ON : OFF);
|
||||
set(&other, ((char *)packetbuf_dataptr())[sizeof(HEADER)] ? ON : OFF);
|
||||
|
||||
/* synchronize the sending to keep the nodes from sending
|
||||
simultaneously */
|
||||
|
@ -137,10 +137,10 @@ PROCESS_THREAD(radio_test_process, ev, data)
|
|||
etimer_reset(&send_timer);
|
||||
|
||||
/* send packet */
|
||||
rimebuf_copyfrom(HEADER, sizeof(HEADER));
|
||||
((char *)rimebuf_dataptr())[sizeof(HEADER)] = recv.onoff;
|
||||
packetbuf_copyfrom(HEADER, sizeof(HEADER));
|
||||
((char *)packetbuf_dataptr())[sizeof(HEADER)] = recv.onoff;
|
||||
/* send arbitrary data to fill the packet size */
|
||||
rimebuf_set_datalen(PACKET_SIZE);
|
||||
packetbuf_set_datalen(PACKET_SIZE);
|
||||
set(&flash, ON);
|
||||
abc_send(&abc);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue