Niclas Finne avatar Niclas Finne committed 7bf4fa4

Removed obsolete mac pointer

Comments (0)

Files changed (6)

apps/shell/shell-sky.c

 #include "dev/watchdog.h"
 
 #include "net/rime.h"
+#include "net/netstack.h"
 #include "dev/cc2420.h"
 #include "dev/leds.h"
 #include "dev/sht11.h"
   static int sample;
   int channel;
   
-  rime_mac->off(0);
+  NETSTACK_MAC.off(0);
 
   cc2420_on();
   for(channel = 11; channel <= 26; ++channel) {
     rssi_samples[sample].channel[channel - 11] = cc2420_rssi() + 53;
   }
   
-  rime_mac->on();
+  NETSTACK_MAC.on();
   
   sample = (sample + 1) % NUM_SAMPLES;
 
 
 int rime_output(struct channel *c);
 
-extern const struct mac_driver *rime_mac;
-
 struct rime_sniffer {
   struct rime_sniffer *next;
   void (* input_callback)(void);

core/net/rime/rime.c

 
 #include "lib/list.h"
 
-const struct mac_driver *rime_mac;
-
 #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL
 #define BROADCAST_ANNOUNCEMENT_CHANNEL RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL
 #else /* RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL */
   packetbuf_clear();
   announcement_init();
 
-  rime_mac = &NETSTACK_MAC;
   chameleon_init();
   
   /* XXX This is initializes the transmission of announcements but it

examples/sky/rssi-scanner.c

 
 #include "contiki.h"
 #include "net/rime.h"
+#include "net/netstack.h"
 
 #include "dev/leds.h"
 #include "dev/cc2420.h"
 {
   PROCESS_BEGIN();
   /* switch mac layer off, and turn radio on */
-  rime_mac->off(0);
+  NETSTACK_MAC.off(0);
   cc2420_on();
 
   while(1) {

examples/sky/sky-collect.c

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

examples/z1/rssi_scanner/rssi-scanner.c

 
 #include "contiki.h"
 #include "net/rime.h"
+#include "net/netstack.h"
 
 #include "dev/leds.h"
 #include "dev/cc2420.h"
 {
   PROCESS_BEGIN();
   /* switch mac layer off, and turn radio on */
-  rime_mac->off(0);
+  NETSTACK_MAC.off(0);
   cc2420_on();
 
   while(1) {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.