/*************************************************************************//** * @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 }
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 }