Beispiel #1
0
/******************************************************************************
 * @fn      InitBoard()
 * @brief   Initialize the CC22538DB Board Peripherals
 * @param   level: COLD,WARM,READY
 * @return  None
 */
void InitBoard( uint8 level )
{
  if ( level == OB_COLD )
  {
    /* Interrupts off */
    osal_int_disable( INTS_ALL );
    HalKeyConfig( FALSE, NULL); //Config GPIO as input
#if (defined OTA_CLIENT) && (OTA_CLIENT == TRUE)
    HalOTAInit();
#endif
 
#ifdef HAL_UART_USB
    znpCfg1 = ZNP_CFG1_UART;
    znpCfg0 = ZNP_CFG0_32K_XTAL;
#elif HAL_SPI
    znpCfg1 = ZNP_CFG1_SPI;
    znpCfg0 = ZNP_CFG0_32K_XTAL;
#else
    znpCfg1 = ZNP_CFG1_UART;
    znpCfg0 = ZNP_CFG0_32K_XTAL;
#endif
   
  }
  else  /* !OB_COLD */
  {
    /* Initialize Key stuff */
    OnboardKeyIntEnable = HAL_KEY_INTERRUPT_DISABLE;
    HalKeyConfig( OnboardKeyIntEnable, OnBoard_KeyCallback);
  }
}
Beispiel #2
0
/******************************************************************************
 * @fn      InitBoard()
 * @brief   Initialize the CC22538DB Board Peripherals
 * @param   level: COLD,WARM,READY
 * @return  None
 */
void InitBoard( uint8 level )
{
  if ( level == OB_COLD )
  {
    // Interrupts off
    osal_int_disable( INTS_ALL );
    HalKeyConfig( FALSE, NULL); //Config GPIO as input
#if (defined OTA_CLIENT) && (OTA_CLIENT == TRUE)
    HalOTAInit();
#endif
  }
  else  // !OB_COLD
  {
    /* Initialize Key stuff */
    OnboardKeyIntEnable = HAL_KEY_INTERRUPT_DISABLE;
    HalKeyConfig( OnboardKeyIntEnable, OnBoard_KeyCallback);
  }
}