mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
80 lines
1.8 KiB
C
80 lines
1.8 KiB
C
|
#include "dev/nullradio.h"
|
||
|
|
||
|
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
init(void)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
prepare(const void *payload, unsigned short payload_len)
|
||
|
{
|
||
|
return 1;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
transmit(unsigned short transmit_len)
|
||
|
{
|
||
|
return RADIO_TX_OK;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
send(const void *payload, unsigned short payload_len)
|
||
|
{
|
||
|
prepare(payload, payload_len);
|
||
|
return transmit(payload_len);
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
read(void *buf, unsigned short buf_len)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
channel_clear(void)
|
||
|
{
|
||
|
return 1;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
receiving_packet(void)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
pending_packet(void)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
on(void)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
static int
|
||
|
off(void)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
/*---------------------------------------------------------------------------*/
|
||
|
const struct radio_driver nullradio_driver =
|
||
|
{
|
||
|
init,
|
||
|
prepare,
|
||
|
transmit,
|
||
|
send,
|
||
|
read,
|
||
|
channel_clear,
|
||
|
receiving_packet,
|
||
|
pending_packet,
|
||
|
on,
|
||
|
off,
|
||
|
};
|
||
|
/*---------------------------------------------------------------------------*/
|