Updated to new radio_driver and mac_driver APIs

This commit is contained in:
nifi 2007-08-07 11:17:54 +00:00
parent cc80dbf546
commit 7e57cd240a
3 changed files with 13 additions and 12 deletions

View file

@ -28,23 +28,22 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: contiki-esb-default-init-net.c,v 1.6 2007/04/04 09:12:14 fros4943 Exp $
* @(#)$Id: contiki-esb-default-init-net.c,v 1.7 2007/08/07 11:17:54 nifi Exp $
*/
#include "contiki-esb.h"
#include "net/rime.h"
#include "net/tr1001-rime.h"
#include "net/mac/nullmac.h"
void
init_net(void)
{
rimeaddr_t rimeaddr;
process_start(&tr1001_rime_process, NULL);
rime_init();
tr1001_init();
nullmac_init(&tr1001_driver);
rime_init(&nullmac_driver);
rimeaddr.u8[0] = node_id >> 8;
rimeaddr.u8[1] = node_id & 0xff;
rimeaddr_set_node_addr(&rimeaddr);

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: contiki-esb-init-net-uip-noslip.c,v 1.1 2007/05/09 15:13:01 nifi Exp $
* $Id: contiki-esb-init-net-uip-noslip.c,v 1.2 2007/08/07 11:17:54 nifi Exp $
*/
#include "contiki-esb.h"
@ -47,9 +47,10 @@ init_net(void)
uip_fw_init();
process_start(&tcpip_process, NULL);
process_start(&tr1001_uip_process, NULL);
process_start(&uip_fw_process, NULL);
tr1001_uip_init();
if (NODE_ID > 0) {
/* node id is set, construct an ip address based on the node id */
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);

View file

@ -26,14 +26,14 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: contiki-esb-init-net-uip.c,v 1.1 2007/04/05 08:11:57 nifi Exp $
* $Id: contiki-esb-init-net-uip.c,v 1.2 2007/08/07 11:17:54 nifi Exp $
*
* -----------------------------------------------------------------
*
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
* Created : 2007-04-03
* Updated : $Date: 2007/04/05 08:11:57 $
* $Revision: 1.1 $
* Updated : $Date: 2007/08/07 11:17:54 $
* $Revision: 1.2 $
*/
#include "contiki-esb.h"
@ -58,9 +58,10 @@ init_net(void)
process_start(&tcpip_process, NULL);
process_start(&slip_process, NULL);
process_start(&tr1001_uip_process, NULL);
process_start(&uip_fw_process, NULL);
tr1001_uip_init();
if (NODE_ID > 0) {
/* node id is set, construct an ip address based on the node id */
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);