Removed obsolete mac pointer

This commit is contained in:
Niclas Finne 2012-03-28 21:51:19 +02:00
parent 173f512f6c
commit 7bf4fa4bff
6 changed files with 10 additions and 11 deletions

View file

@ -44,6 +44,7 @@
#include "dev/watchdog.h" #include "dev/watchdog.h"
#include "net/rime.h" #include "net/rime.h"
#include "net/netstack.h"
#include "dev/cc2420.h" #include "dev/cc2420.h"
#include "dev/leds.h" #include "dev/leds.h"
#include "dev/sht11.h" #include "dev/sht11.h"
@ -97,7 +98,7 @@ do_rssi(void)
static int sample; static int sample;
int channel; int channel;
rime_mac->off(0); NETSTACK_MAC.off(0);
cc2420_on(); cc2420_on();
for(channel = 11; channel <= 26; ++channel) { for(channel = 11; channel <= 26; ++channel) {
@ -105,7 +106,7 @@ do_rssi(void)
rssi_samples[sample].channel[channel - 11] = cc2420_rssi() + 53; rssi_samples[sample].channel[channel - 11] = cc2420_rssi() + 53;
} }
rime_mac->on(); NETSTACK_MAC.on();
sample = (sample + 1) % NUM_SAMPLES; sample = (sample + 1) % NUM_SAMPLES;

View file

@ -89,8 +89,6 @@ void rime_input(void);
int rime_output(struct channel *c); int rime_output(struct channel *c);
extern const struct mac_driver *rime_mac;
struct rime_sniffer { struct rime_sniffer {
struct rime_sniffer *next; struct rime_sniffer *next;
void (* input_callback)(void); void (* input_callback)(void);

View file

@ -61,8 +61,6 @@
#include "lib/list.h" #include "lib/list.h"
const struct mac_driver *rime_mac;
#ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL
#define BROADCAST_ANNOUNCEMENT_CHANNEL RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL #define BROADCAST_ANNOUNCEMENT_CHANNEL RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL
#else /* RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL */ #else /* RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL */
@ -130,7 +128,6 @@ init(void)
packetbuf_clear(); packetbuf_clear();
announcement_init(); announcement_init();
rime_mac = &NETSTACK_MAC;
chameleon_init(); chameleon_init();
/* XXX This is initializes the transmission of announcements but it /* XXX This is initializes the transmission of announcements but it

View file

@ -41,6 +41,7 @@
#include "contiki.h" #include "contiki.h"
#include "net/rime.h" #include "net/rime.h"
#include "net/netstack.h"
#include "dev/leds.h" #include "dev/leds.h"
#include "dev/cc2420.h" #include "dev/cc2420.h"
@ -81,7 +82,7 @@ PROCESS_THREAD(scanner_process, ev, data)
{ {
PROCESS_BEGIN(); PROCESS_BEGIN();
/* switch mac layer off, and turn radio on */ /* switch mac layer off, and turn radio on */
rime_mac->off(0); NETSTACK_MAC.off(0);
cc2420_on(); cc2420_on();
while(1) { while(1) {

View file

@ -39,6 +39,7 @@
*/ */
#include "contiki.h" #include "contiki.h"
#include "net/netstack.h"
#include "net/rime.h" #include "net/rime.h"
#include "net/rime/collect.h" #include "net/rime/collect.h"
#include "net/rime/collect-neighbor.h" #include "net/rime/collect-neighbor.h"
@ -133,7 +134,7 @@ do_rssi(void)
static int sample; static int sample;
int channel; int channel;
rime_mac->off(0); NETSTACK_MAC.off(0);
cc2420_on(); cc2420_on();
for(channel = 11; channel <= 26; ++channel) { for(channel = 11; channel <= 26; ++channel) {
@ -141,7 +142,7 @@ do_rssi(void)
rssi_samples[sample].channel[channel - 11] = cc2420_rssi() + 53; rssi_samples[sample].channel[channel - 11] = cc2420_rssi() + 53;
} }
rime_mac->on(); NETSTACK_MAC.on();
sample = (sample + 1) % NUM_SAMPLES; sample = (sample + 1) % NUM_SAMPLES;

View file

@ -41,6 +41,7 @@
#include "contiki.h" #include "contiki.h"
#include "net/rime.h" #include "net/rime.h"
#include "net/netstack.h"
#include "dev/leds.h" #include "dev/leds.h"
#include "dev/cc2420.h" #include "dev/cc2420.h"
@ -83,7 +84,7 @@ PROCESS_THREAD(scanner_process, ev, data)
{ {
PROCESS_BEGIN(); PROCESS_BEGIN();
/* switch mac layer off, and turn radio on */ /* switch mac layer off, and turn radio on */
rime_mac->off(0); NETSTACK_MAC.off(0);
cc2420_on(); cc2420_on();
while(1) { while(1) {