Ejemplo n.º 1
0
Archivo: nwk.c Proyecto: InSoonPark/asf
/*************************************************************************//**
*  @brief Initializes all network layer modules
*****************************************************************************/
void NWK_Init(void)
{
	nwkIb.nwkSeqNum = 0;
	nwkIb.macSeqNum = 0;
	nwkIb.addr = 0;
	nwkIb.lock = 0;

	for (uint8_t i = 0; i < NWK_ENDPOINTS_AMOUNT; i++) {
		nwkIb.endpoint[i] = NULL;
	}

	nwkTxInit();
	nwkRxInit();
	nwkFrameInit();
	nwkDataReqInit();

#ifdef NWK_ENABLE_ROUTING
	nwkRouteInit();
#endif

#ifdef NWK_ENABLE_SECURITY
	nwkSecurityInit();
#endif

#ifdef NWK_ENABLE_MULTICAST
	nwkGroupInit();
#endif

#ifdef NWK_ENABLE_ROUTE_DISCOVERY
	nwkRouteDiscoveryInit();
#endif
}
Ejemplo n.º 2
0
void NWK_Init(void)
{
  nwkIb.nwkSeqNum = 0;
  nwkIb.macSeqNum = 0;
  nwkIb.addr = 0;

  for (uint8_t i = 0; i < NWK_MAX_ENDPOINTS_AMOUNT; i++)
    nwkIb.endpoint[i] = NULL;

  nwkTxInit();
  nwkRxInit();
  nwkFrameInit();
  nwkDataReqInit();

#ifdef NWK_ENABLE_ROUTING
  nwkRouteInit();
#endif

#ifdef NWK_ENABLE_SECURITY
  nwkSecurityInit();
#endif
}