Updated to new radio_driver and mac_driver APIs
This commit is contained in:
parent
cc80dbf546
commit
7e57cd240a
3 changed files with 13 additions and 12 deletions
|
@ -28,23 +28,22 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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 "contiki-esb.h"
|
||||||
|
|
||||||
#include "net/rime.h"
|
#include "net/rime.h"
|
||||||
|
#include "net/mac/nullmac.h"
|
||||||
#include "net/tr1001-rime.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
init_net(void)
|
init_net(void)
|
||||||
{
|
{
|
||||||
rimeaddr_t rimeaddr;
|
rimeaddr_t rimeaddr;
|
||||||
|
|
||||||
process_start(&tr1001_rime_process, NULL);
|
tr1001_init();
|
||||||
|
nullmac_init(&tr1001_driver);
|
||||||
rime_init();
|
rime_init(&nullmac_driver);
|
||||||
rimeaddr.u8[0] = node_id >> 8;
|
rimeaddr.u8[0] = node_id >> 8;
|
||||||
rimeaddr.u8[1] = node_id & 0xff;
|
rimeaddr.u8[1] = node_id & 0xff;
|
||||||
rimeaddr_set_node_addr(&rimeaddr);
|
rimeaddr_set_node_addr(&rimeaddr);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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"
|
#include "contiki-esb.h"
|
||||||
|
@ -47,9 +47,10 @@ init_net(void)
|
||||||
uip_fw_init();
|
uip_fw_init();
|
||||||
|
|
||||||
process_start(&tcpip_process, NULL);
|
process_start(&tcpip_process, NULL);
|
||||||
process_start(&tr1001_uip_process, NULL);
|
|
||||||
process_start(&uip_fw_process, NULL);
|
process_start(&uip_fw_process, NULL);
|
||||||
|
|
||||||
|
tr1001_uip_init();
|
||||||
|
|
||||||
if (NODE_ID > 0) {
|
if (NODE_ID > 0) {
|
||||||
/* node id is set, construct an ip address based on the node id */
|
/* node id is set, construct an ip address based on the node id */
|
||||||
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);
|
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* 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
|
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
|
||||||
* Created : 2007-04-03
|
* Created : 2007-04-03
|
||||||
* Updated : $Date: 2007/04/05 08:11:57 $
|
* Updated : $Date: 2007/08/07 11:17:54 $
|
||||||
* $Revision: 1.1 $
|
* $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "contiki-esb.h"
|
#include "contiki-esb.h"
|
||||||
|
@ -58,9 +58,10 @@ init_net(void)
|
||||||
|
|
||||||
process_start(&tcpip_process, NULL);
|
process_start(&tcpip_process, NULL);
|
||||||
process_start(&slip_process, NULL);
|
process_start(&slip_process, NULL);
|
||||||
process_start(&tr1001_uip_process, NULL);
|
|
||||||
process_start(&uip_fw_process, NULL);
|
process_start(&uip_fw_process, NULL);
|
||||||
|
|
||||||
|
tr1001_uip_init();
|
||||||
|
|
||||||
if (NODE_ID > 0) {
|
if (NODE_ID > 0) {
|
||||||
/* node id is set, construct an ip address based on the node id */
|
/* node id is set, construct an ip address based on the node id */
|
||||||
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);
|
uip_ipaddr(&hostaddr, 172, 16, 1, NODE_ID);
|
||||||
|
|
Loading…
Reference in a new issue