updated for latest mac driver structure
This commit is contained in:
parent
229d60d691
commit
e42d572f81
2 changed files with 17 additions and 14 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: tdma_mac.c,v 1.4 2008/02/24 22:10:30 adamdunkels Exp $
|
||||
* $Id: tdma_mac.c,v 1.5 2008/11/12 12:42:41 fros4943 Exp $
|
||||
*/
|
||||
|
||||
#include "contiki.h"
|
||||
|
@ -226,7 +226,7 @@ off(void)
|
|||
return radio->off();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
const struct mac_driver *
|
||||
tdma_mac_init(const struct radio_driver *d)
|
||||
{
|
||||
int i;
|
||||
|
@ -237,12 +237,15 @@ tdma_mac_init(const struct radio_driver *d)
|
|||
radio = d;
|
||||
radio->set_receive_function(input);
|
||||
radio->on();
|
||||
|
||||
return &tdma_mac_driver;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
const struct mac_driver tdma_mac_driver = {
|
||||
send,
|
||||
read,
|
||||
set_receive_function,
|
||||
on,
|
||||
off,
|
||||
"TDMA MAC",
|
||||
send,
|
||||
read,
|
||||
set_receive_function,
|
||||
on,
|
||||
off,
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: tdma_mac.h,v 1.1 2007/08/31 13:42:22 fros4943 Exp $
|
||||
* $Id: tdma_mac.h,v 1.2 2008/11/12 12:42:41 fros4943 Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TDMA_MAC_H__
|
||||
|
@ -39,6 +39,6 @@
|
|||
|
||||
extern const struct mac_driver tdma_mac_driver;
|
||||
|
||||
void tdma_mac_init(const struct radio_driver *r);
|
||||
const struct mac_driver * tdma_mac_init(const struct radio_driver *r);
|
||||
|
||||
#endif /* __TDMA_MAC_H__ */
|
||||
|
|
Loading…
Reference in a new issue