nullradio.c

00001 #include "dev/nullradio.h"
00002 
00003 
00004 /*---------------------------------------------------------------------------*/
00005 static int
00006 init(void)
00007 {
00008   return 0;
00009 }
00010 /*---------------------------------------------------------------------------*/
00011 static int
00012 prepare(const void *payload, unsigned short payload_len)
00013 {
00014   return 1;
00015 }
00016 /*---------------------------------------------------------------------------*/
00017 static int
00018 transmit(unsigned short transmit_len)
00019 {
00020   return RADIO_TX_OK;
00021 }
00022 /*---------------------------------------------------------------------------*/
00023 static int
00024 send(const void *payload, unsigned short payload_len)
00025 {
00026   prepare(payload, payload_len);
00027   return transmit(payload_len);
00028 }
00029 /*---------------------------------------------------------------------------*/
00030 static int
00031 read(void *buf, unsigned short buf_len)
00032 {
00033   return 0;
00034 }
00035 /*---------------------------------------------------------------------------*/
00036 static int
00037 channel_clear(void)
00038 {
00039   return 1;
00040 }
00041 /*---------------------------------------------------------------------------*/
00042 static int
00043 receiving_packet(void)
00044 {
00045   return 0;
00046 }
00047 /*---------------------------------------------------------------------------*/
00048 static int
00049 pending_packet(void)
00050 {
00051   return 0;
00052 }
00053 /*---------------------------------------------------------------------------*/
00054 static int
00055 on(void)
00056 {
00057   return 0;
00058 }
00059 /*---------------------------------------------------------------------------*/
00060 static int
00061 off(void)
00062 {
00063   return 0;
00064 }
00065 /*---------------------------------------------------------------------------*/
00066 const struct radio_driver nullradio_driver =
00067   {
00068     init,
00069     prepare,
00070     transmit,
00071     send,
00072     read,
00073     channel_clear,
00074     receiving_packet,
00075     pending_packet,
00076     on,
00077     off,
00078   };
00079 /*---------------------------------------------------------------------------*/

Generated on Mon Apr 11 14:23:28 2011 for Contiki 2.5 by  doxygen 1.6.1