Comment, spacing cleanup
This commit is contained in:
		@@ -113,7 +113,7 @@ bool PersistentStore::access_start() {
 | 
			
		||||
      // This must be the first time since power on that we have accessed the storage, or someone
 | 
			
		||||
      // loaded and called write_data and never called access_finish.
 | 
			
		||||
      // Lets go looking for the slot that holds our configuration.
 | 
			
		||||
      if (eeprom_data_written) DEBUG_ECHOLN("Dangling EEPROM write_data");
 | 
			
		||||
      if (eeprom_data_written) DEBUG_ECHOLNPGM("Dangling EEPROM write_data");
 | 
			
		||||
      uint32_t address = FLASH_ADDRESS_START;
 | 
			
		||||
      while (address <= FLASH_ADDRESS_END) {
 | 
			
		||||
        uint32_t address_value = (*(__IO uint32_t*)address);
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ void set_pwm_frequency(const pin_t pin, int f_desired) {
 | 
			
		||||
 | 
			
		||||
  PinName pin_name = digitalPinToPinName(pin);
 | 
			
		||||
  TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM); // Get HAL timer instance
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
  LOOP_S_L_N(i, 0, NUM_HARDWARE_TIMERS) // Protect used timers
 | 
			
		||||
    if (timer_instance[i] && timer_instance[i]->getHandle()->Instance == Instance)
 | 
			
		||||
      return;
 | 
			
		||||
 
 | 
			
		||||
@@ -34,9 +34,7 @@
 | 
			
		||||
#include "watchdog.h"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *  The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and
 | 
			
		||||
 *  625 reload value (counts down to 0)
 | 
			
		||||
 *  use 1250 for 8 seconds
 | 
			
		||||
 *  The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
 | 
			
		||||
 */
 | 
			
		||||
#define STM32F1_WD_RELOAD TERN(WATCHDOG_DURATION_8S, 1250, 625) // 4 or 8 second timeout
 | 
			
		||||
 | 
			
		||||
@@ -56,7 +54,7 @@ void watchdogSetup() {
 | 
			
		||||
 *
 | 
			
		||||
 * @return No return
 | 
			
		||||
 *
 | 
			
		||||
 * @details The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and 625 reload value (counts down to 0)
 | 
			
		||||
 * @details The watchdog clock is 40Khz. So for a 4s or 8s interval use a /256 preescaler and 625 or 1250 reload value (counts down to 0).
 | 
			
		||||
 */
 | 
			
		||||
void watchdog_init() {
 | 
			
		||||
  #if DISABLED(DISABLE_WATCHDOG_INIT)
 | 
			
		||||
 
 | 
			
		||||
@@ -27,11 +27,9 @@
 | 
			
		||||
 | 
			
		||||
#include <libmaple/iwdg.h>
 | 
			
		||||
 | 
			
		||||
// Arduino STM32F1 core now has watchdog support
 | 
			
		||||
 | 
			
		||||
// Initialize watchdog with a 4 second countdown time
 | 
			
		||||
// Initialize watchdog with a 4 or 8 second countdown time
 | 
			
		||||
void watchdog_init();
 | 
			
		||||
 | 
			
		||||
// Reset watchdog. MUST be called at least every 4 seconds after the
 | 
			
		||||
// first watchdog_init or STM32F1 will reset.
 | 
			
		||||
// Reset watchdog. MUST be called every 4 or 8 seconds after the
 | 
			
		||||
// first watchdog_init or the STM32F1 will reset.
 | 
			
		||||
void HAL_watchdog_refresh();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user