void InitializeExitSniffOnReceive(void)
{
  nvExitSniffOnReceive = EXIT_SNIFF_ON_RECEIVE_DEFAULT;
  OsalNvItemInit(NVID_EXIT_SNIFF_ON_RECEIVE, 
                 sizeof(nvExitSniffOnReceive), 
                 &nvExitSniffOnReceive);
}
void InitializeSavePairingInfo(void)
{
  nvSavePairingInfo = SAVE_PAIRING_INFO_DEFAULT;
  OsalNvItemInit(NVID_SAVE_PAIRING_INFO, 
                 sizeof(nvSavePairingInfo), 
                 &nvSavePairingInfo);
}
void InitializeEnableSniffEntry(void)
{
  nvEnableSniffEntry = ENABLE_SNIFF_ENTRY_DEFAULT;
  OsalNvItemInit(NVID_ENABLE_SNIFF_ENTRY, 
                 sizeof(nvEnableSniffEntry), 
                 &nvEnableSniffEntry);
}
Esempio n. 4
0
void InitializeLinkAlarmEnable(void)
{
  nvLinkAlarmEnable = 0;
  OsalNvItemInit(NVID_LINK_ALARM_ENABLE, 
                 sizeof(nvLinkAlarmEnable), 
                 &nvLinkAlarmEnable);
}
Esempio n. 5
0
void InitializePairingModeDuration(void)
{
  nvPairingModeDurationInSeconds = PAIRING_MODE_TIMEOUT_IN_SECONDS;
  OsalNvItemInit(NVID_PAIRING_MODE_DURATION, 
                 sizeof(nvPairingModeDurationInSeconds), 
                 &nvPairingModeDurationInSeconds);
}
Esempio n. 6
0
void InitializeDisplaySeconds(void)
{
  nvDisplaySeconds = 0;
  OsalNvItemInit(NVID_DISPLAY_SECONDS,
                 sizeof(nvDisplaySeconds),
                 &nvDisplaySeconds);
}
Esempio n. 7
0
void InitializeDebugFlags(void)
{
  nvSniffDebug = SNIFF_DEBUG_DEFAULT;
  OsalNvItemInit(NVID_SNIFF_DEBUG,
                 sizeof(nvSniffDebug),
                 &nvSniffDebug);
  
  nvBatteryDebug = BATTERY_DEBUG_DEFAULT;
  OsalNvItemInit(NVID_BATTERY_DEBUG,
                 sizeof(nvBatteryDebug),
                 &nvBatteryDebug);
    
  nvConnectionDebug = CONNECTION_DEBUG_DEFAULT;
  OsalNvItemInit(NVID_CONNECTION_DEBUG,
                 sizeof(nvConnectionDebug),
                 &nvConnectionDebug);
}
void InitializeDateFormat(void)
{
  nvDateFormat = DAY_FIRST;
  
  OsalNvItemInit(NVID_DATE_FORMAT, 
                 sizeof(nvDateFormat), 
                 &nvDateFormat);
  
}
Esempio n. 9
0
/*! Setup the battery monitor interval - only happens at startup */
static void InitializeBatteryMonitorInterval(void)
{
  nvBatteryMonitorIntervalInSeconds = 8;

  OsalNvItemInit(NVID_BATTERY_SENSE_INTERVAL,
                 sizeof(nvBatteryMonitorIntervalInSeconds),
                 &nvBatteryMonitorIntervalInSeconds);

}
void InitializeTimeFormat(void)
{
  nvTimeFormat = TWELVE_HOUR;
  
  OsalNvItemInit(NVID_TIME_FORMAT, 
                 sizeof(nvTimeFormat), 
                 &nvTimeFormat);


}
Esempio n. 11
0
void InitializeRstNmiConfiguration(void)
{
  nvRstNmiConfiguration = RST_PIN_DISABLED;
  OsalNvItemInit(NVID_RSTNMI_CONFIGURATION,
                 sizeof(nvRstNmiConfiguration),
                 &nvRstNmiConfiguration);

  ConfigureResetPinFunction(nvRstNmiConfiguration);

}
Esempio n. 12
0
void InitializeModeTimeouts(void)
{
  
#ifdef ANALOG
  nvApplicationModeTimeout  = ONE_SECOND*60*10;
  nvNotificationModeTimeout = ONE_SECOND*30;
#else
  nvApplicationModeTimeout  = ONE_SECOND*60*10;
  nvNotificationModeTimeout = ONE_SECOND*30;  
#endif
  
  OsalNvItemInit(NVID_APPLICATION_MODE_TIMEOUT,
                 sizeof(nvApplicationModeTimeout),
                 &nvApplicationModeTimeout);
  
  OsalNvItemInit(NVID_NOTIFICATION_MODE_TIMEOUT,
                 sizeof(nvNotificationModeTimeout),
                 &nvNotificationModeTimeout);
}
Esempio n. 13
0
void InitializeLanguage(void)
{
  nvLanguage = LANG_DE;
  OsalNvItemInit(NVID_LANGUAGE, sizeof(nvLanguage), &nvLanguage);
}
Esempio n. 14
0
void WatchdogTimeoutHandler(unsigned char ResetSource)
{
  /* always print information about the number of watchdogs that have occured */
  unsigned char nvWatchdogCount = 0;
  OsalNvItemInit(NVID_WATCHDOG_RESET_COUNT,
                 sizeof(nvWatchdogCount),
                 &nvWatchdogCount);

  PrintStringAndDecimal("Total Watchdogs: ",nvWatchdogCount);
   
  if ( ResetSource == SYSRSTIV_WDTTO || ResetSource == SYSRSTIV_WDTKEY )
  {
    if ( ResetSource == SYSRSTIV_WDTTO )
    {
      PrintString("## Watchdog Failsafe\r\n");
    }
    else
    {
      PrintString("## Forced Watchdog Timeout\r\n");
    }
    
    PrintStringAndDecimal("SppReadyToSleep ",WatchdogInfo.SppReadyToSleep);
    
    PrintStringAndDecimal("TaskDelayLockCount ",
                          WatchdogInfo.TaskDelayLockCount);
    
    PrintStringAndDecimal("DisplayMessagesWaiting ",
                          WatchdogInfo.DisplayMessagesWaiting);
    
    PrintStringAndDecimal("SppMessagesWaiting ",
                          WatchdogInfo.SppMessagesWaiting);
    
    /* 
     * now save the information
     */

    /* If a watchdog is occurring over and over we don't want to ruin the flash.
     * Limit to 255 writes until code is reflashed or phone clears value
     */
#if WATCHDOG_TEST_MODE == 0
    if ( nvWatchdogCount < 0xFF )
#else
    if ( nvWatchdogCount < 0x01 )
#endif
    {
      nvWatchdogCount++;
      OsalNvWrite(NVID_WATCHDOG_RESET_COUNT,
                  NV_ZERO_OFFSET,
                  sizeof(nvWatchdogCount),
                  &nvWatchdogCount);
    
      OsalNvItemInit(NVID_WATCHDOG_INFORMATION,
                     sizeof(WatchdogInfo),
                     &WatchdogInfo);
    
      OsalNvWrite(NVID_WATCHDOG_INFORMATION,
                  NV_ZERO_OFFSET,
                  sizeof(WatchdogInfo),
                  &WatchdogInfo);
    }
  }
  
}