Esempio n. 1
0
/********************************************************************************************************
 * @fn      ZMacInit
 *
 * @brief   Initialize MAC.
 *
 * @param   none.
 *
 * @return  status.
 ********************************************************************************************************/
uint8 ZMacInit( void )
{
  uint8 stat;

#if defined( ZCL_KEY_ESTABLISH )
  /* Set the callback function for 16 byte random seed */
  MAC_SetRandomSeedCB( SSP_StoreRandomSeedNV);
#endif

  MAC_Init();
  MAC_InitDevice();

#if !defined NONWK
  if ( ZG_BUILD_RTR_TYPE )
  {
    MAC_InitCoord();
  }
#endif

  // If OK, initialize the MAC
  stat = ZMacReset( TRUE );

  // Turn off interrupts
  osal_int_disable( INTS_ALL );

  return ( stat );
}
Esempio n. 2
0
/********************************************************************************************************
 * @fn      ZMacInit
 *
 * @brief   Initialize MAC.
 *
 * @param   none.
 *
 * @return  status.
 ********************************************************************************************************/
ROOT uint8 ZMacInit( void )
{
  uint8 stat;

  MAC_Init();
  MAC_InitDevice();

#if defined ( RTR_NWK )
  MAC_InitCoord();
#endif

  // If OK, initialize the MAC
  stat = ZMacReset( TRUE );

  // Turn off interrupts
  osal_int_disable( INTS_ALL );

  return ( stat );
}