Contiki 2.5
nullradio.c
1 #include "dev/nullradio.h"
2 
3 
4 /*---------------------------------------------------------------------------*/
5 static int
6 init(void)
7 {
8  return 0;
9 }
10 /*---------------------------------------------------------------------------*/
11 static int
12 prepare(const void *payload, unsigned short payload_len)
13 {
14  return 1;
15 }
16 /*---------------------------------------------------------------------------*/
17 static int
18 transmit(unsigned short transmit_len)
19 {
20  return RADIO_TX_OK;
21 }
22 /*---------------------------------------------------------------------------*/
23 static int
24 send(const void *payload, unsigned short payload_len)
25 {
26  prepare(payload, payload_len);
27  return transmit(payload_len);
28 }
29 /*---------------------------------------------------------------------------*/
30 static int
31 read(void *buf, unsigned short buf_len)
32 {
33  return 0;
34 }
35 /*---------------------------------------------------------------------------*/
36 static int
37 channel_clear(void)
38 {
39  return 1;
40 }
41 /*---------------------------------------------------------------------------*/
42 static int
43 receiving_packet(void)
44 {
45  return 0;
46 }
47 /*---------------------------------------------------------------------------*/
48 static int
49 pending_packet(void)
50 {
51  return 0;
52 }
53 /*---------------------------------------------------------------------------*/
54 static int
55 on(void)
56 {
57  return 0;
58 }
59 /*---------------------------------------------------------------------------*/
60 static int
61 off(void)
62 {
63  return 0;
64 }
65 /*---------------------------------------------------------------------------*/
66 const struct radio_driver nullradio_driver =
67  {
68  init,
69  prepare,
70  transmit,
71  send,
72  read,
76  on,
77  off,
78  };
79 /*---------------------------------------------------------------------------*/