Easily avoided double (meant to be a forward ?) definition of timesynch_driver.

This commit is contained in:
oliverschmidt 2007-12-20 20:30:55 +00:00
parent 14fa993204
commit 1b5ae78a95

View File

@ -34,7 +34,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: timesynch.c,v 1.2 2007/12/16 14:48:33 adamdunkels Exp $ * $Id: timesynch.c,v 1.3 2007/12/20 20:30:55 oliverschmidt Exp $
*/ */
/** /**
@ -49,7 +49,6 @@
#include "net/rime.h" #include "net/rime.h"
#include "dev/simple-cc2420.h" #include "dev/simple-cc2420.h"
static const struct mac_driver timesynch_driver;
static const struct mac_driver *mac; static const struct mac_driver *mac;
static void (* receiver_callback)(const struct mac_driver *); static void (* receiver_callback)(const struct mac_driver *);
@ -96,14 +95,6 @@ send(void)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static void
input(const struct mac_driver *d)
{
if(receiver_callback) {
receiver_callback(&timesynch_driver);
}
}
/*---------------------------------------------------------------------------*/
static void
adjust_offset(rtimer_clock_t authoritative_time, rtimer_clock_t local_time) adjust_offset(rtimer_clock_t authoritative_time, rtimer_clock_t local_time)
{ {
offset = offset + authoritative_time - local_time; offset = offset + authoritative_time - local_time;
@ -161,6 +152,14 @@ static const struct mac_driver timesynch_driver = {
off, off,
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void
input(const struct mac_driver *d)
{
if(receiver_callback) {
receiver_callback(&timesynch_driver);
}
}
/*---------------------------------------------------------------------------*/
const struct mac_driver * const struct mac_driver *
timesynch_init(const struct mac_driver *d) timesynch_init(const struct mac_driver *d)
{ {