コード例 #1
0
void InitializeExitSniffOnReceive(void)
{
  nvExitSniffOnReceive = EXIT_SNIFF_ON_RECEIVE_DEFAULT;
  OsalNvItemInit(NVID_EXIT_SNIFF_ON_RECEIVE, 
                 sizeof(nvExitSniffOnReceive), 
                 &nvExitSniffOnReceive);
}
コード例 #2
0
void InitializeSavePairingInfo(void)
{
  nvSavePairingInfo = SAVE_PAIRING_INFO_DEFAULT;
  OsalNvItemInit(NVID_SAVE_PAIRING_INFO, 
                 sizeof(nvSavePairingInfo), 
                 &nvSavePairingInfo);
}
コード例 #3
0
void InitializeEnableSniffEntry(void)
{
  nvEnableSniffEntry = ENABLE_SNIFF_ENTRY_DEFAULT;
  OsalNvItemInit(NVID_ENABLE_SNIFF_ENTRY, 
                 sizeof(nvEnableSniffEntry), 
                 &nvEnableSniffEntry);
}
コード例 #4
0
ファイル: Display.c プロジェクト: arsh0r/MetaWatch-WDS11x
void InitializeLinkAlarmEnable(void)
{
  nvLinkAlarmEnable = 0;
  OsalNvItemInit(NVID_LINK_ALARM_ENABLE, 
                 sizeof(nvLinkAlarmEnable), 
                 &nvLinkAlarmEnable);
}
コード例 #5
0
ファイル: Display.c プロジェクト: arsh0r/MetaWatch-WDS11x
void InitializePairingModeDuration(void)
{
  nvPairingModeDurationInSeconds = PAIRING_MODE_TIMEOUT_IN_SECONDS;
  OsalNvItemInit(NVID_PAIRING_MODE_DURATION, 
                 sizeof(nvPairingModeDurationInSeconds), 
                 &nvPairingModeDurationInSeconds);
}
コード例 #6
0
void InitializeDisplaySeconds(void)
{
  nvDisplaySeconds = 0;
  OsalNvItemInit(NVID_DISPLAY_SECONDS,
                 sizeof(nvDisplaySeconds),
                 &nvDisplaySeconds);
}
コード例 #7
0
ファイル: Display.c プロジェクト: arsh0r/MetaWatch-WDS11x
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);
}
コード例 #8
0
void InitializeDateFormat(void)
{
  nvDateFormat = DAY_FIRST;
  
  OsalNvItemInit(NVID_DATE_FORMAT, 
                 sizeof(nvDateFormat), 
                 &nvDateFormat);
  
}
コード例 #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);

}
コード例 #10
0
void InitializeTimeFormat(void)
{
  nvTimeFormat = TWELVE_HOUR;
  
  OsalNvItemInit(NVID_TIME_FORMAT, 
                 sizeof(nvTimeFormat), 
                 &nvTimeFormat);


}
コード例 #11
0
void InitializeRstNmiConfiguration(void)
{
  nvRstNmiConfiguration = RST_PIN_DISABLED;
  OsalNvItemInit(NVID_RSTNMI_CONFIGURATION,
                 sizeof(nvRstNmiConfiguration),
                 &nvRstNmiConfiguration);

  ConfigureResetPinFunction(nvRstNmiConfiguration);

}
コード例 #12
0
ファイル: Display.c プロジェクト: arsh0r/MetaWatch-WDS11x
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);
}
コード例 #13
0
ファイル: Display.c プロジェクト: arsh0r/MetaWatch-WDS11x
void InitializeLanguage(void)
{
  nvLanguage = LANG_DE;
  OsalNvItemInit(NVID_LANGUAGE, sizeof(nvLanguage), &nvLanguage);
}
コード例 #14
0
ファイル: IdleTask.c プロジェクト: c0g/MetaWatch-Gen2
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);
    }
  }
  
}