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); }
void InitializeLinkAlarmEnable(void) { nvLinkAlarmEnable = 0; OsalNvItemInit(NVID_LINK_ALARM_ENABLE, sizeof(nvLinkAlarmEnable), &nvLinkAlarmEnable); }
void InitializePairingModeDuration(void) { nvPairingModeDurationInSeconds = PAIRING_MODE_TIMEOUT_IN_SECONDS; OsalNvItemInit(NVID_PAIRING_MODE_DURATION, sizeof(nvPairingModeDurationInSeconds), &nvPairingModeDurationInSeconds); }
void InitializeDisplaySeconds(void) { nvDisplaySeconds = 0; OsalNvItemInit(NVID_DISPLAY_SECONDS, sizeof(nvDisplaySeconds), &nvDisplaySeconds); }
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); }
/*! 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); }
void InitializeRstNmiConfiguration(void) { nvRstNmiConfiguration = RST_PIN_DISABLED; OsalNvItemInit(NVID_RSTNMI_CONFIGURATION, sizeof(nvRstNmiConfiguration), &nvRstNmiConfiguration); ConfigureResetPinFunction(nvRstNmiConfiguration); }
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); }
void InitializeLanguage(void) { nvLanguage = LANG_DE; OsalNvItemInit(NVID_LANGUAGE, sizeof(nvLanguage), &nvLanguage); }
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); } } }