Revised version of the X-MAC implementation that uses a ctimer instead
of an rtimer for the periodic radio duty cycling. The benefit of this implementation is that it leaves an rtimer free for user tasks. The drawback is a slightly higher idle power consumption. This new version is based on the current rtimer-based X-MAC.
This commit is contained in:
parent
6111814aec
commit
1a13d25d33
3 changed files with 837 additions and 349 deletions
|
@ -1,2 +1,2 @@
|
||||||
CONTIKI_SOURCEFILES += xmac.c nullmac.c lpp.c frame802154.c sicslowmac.c
|
CONTIKI_SOURCEFILES += cxmac.c xmac.c nullmac.c lpp.c frame802154.c sicslowmac.c
|
||||||
CONTIKI_SOURCEFILES += framer.c framer-nullmac.c framer-802154.c csma.c
|
CONTIKI_SOURCEFILES += framer.c framer-nullmac.c framer-802154.c csma.c
|
||||||
|
|
1164
core/net/mac/cxmac.c
1164
core/net/mac/cxmac.c
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: cxmac.h,v 1.2 2009/06/22 11:14:11 nifi Exp $
|
* $Id: cxmac.h,v 1.3 2010/01/31 18:44:23 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,11 +41,29 @@
|
||||||
#ifndef __CXMAC_H__
|
#ifndef __CXMAC_H__
|
||||||
#define __CXMAC_H__
|
#define __CXMAC_H__
|
||||||
|
|
||||||
|
#include "sys/rtimer.h"
|
||||||
#include "net/mac/mac.h"
|
#include "net/mac/mac.h"
|
||||||
#include "dev/radio.h"
|
#include "dev/radio.h"
|
||||||
|
|
||||||
|
#define CXMAC_RECEIVER "cxmac.recv"
|
||||||
|
#define CXMAC_STROBES "cxmac.strobes"
|
||||||
|
#define CXMAC_SEND_WITH_ACK "cxmac.send.ack"
|
||||||
|
#define CXMAC_SEND_WITH_NOACK "cxmac.send.noack"
|
||||||
|
|
||||||
|
|
||||||
|
struct cxmac_config {
|
||||||
|
rtimer_clock_t on_time;
|
||||||
|
rtimer_clock_t off_time;
|
||||||
|
rtimer_clock_t strobe_time;
|
||||||
|
rtimer_clock_t strobe_wait_time;
|
||||||
|
};
|
||||||
|
|
||||||
extern const struct mac_driver cxmac_driver;
|
extern const struct mac_driver cxmac_driver;
|
||||||
|
|
||||||
const struct mac_driver *cxmac_init(const struct radio_driver *d);
|
const struct mac_driver *cxmac_init(const struct radio_driver *d);
|
||||||
|
|
||||||
|
extern struct cxmac_config cxmac_config;
|
||||||
|
|
||||||
|
void cxmac_set_announcement_radio_txpower(int txpower);
|
||||||
|
|
||||||
#endif /* __CXMAC_H__ */
|
#endif /* __CXMAC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue