           Serial.print("Menu: unrecognized event "); Serial.println(event);
           break;
       }
-      
+
       // update the menu display
       Serial.print("Calling menu->display: menu->title=");
       Serial.print(menu->title);

  lcd.write("Hz");
}

void save_select(Menu *menu, int slot_num)
{
  int freq_address = SaveFreqBase + slot_num * SaveFreqSize;
  int offset_address = SaveOffsetBase + slot_num * SaveOffsetSize;

  Serial.print("save_select: saving Frequency "); Serial.print(VfoFrequency);
  Serial.print(" to slot "); Serial.println(slot_num);
  
  EEPROM.put(freq_address, VfoFrequency);

  Serial.print("save_select: saving Offset "); Serial.print(VfoSelectDigit);
  Serial.print(" to slot "); Serial.println(slot_num);
  
  EEPROM.put(offset_address, VfoSelectDigit);
}

void restore_select(Menu *menu, int slot_num)
{
  Serial.print("restore_select: slot_num="); Serial.println(slot_num);
  int freq_address = SaveFreqBase + slot_num * SaveFreqSize;
  int offset_address = SaveOffsetBase + slot_num * SaveOffsetSize;

  EEPROM.get(freq_address, VfoFrequency);
  EEPROM.get(offset_address, VfoSelectDigit);
  
  Serial.print("restore_select: restoring frequency "); Serial.print(VfoFrequency);
  Serial.print(" and offset "); Serial.print(VfoSelectDigit);
  Serial.print(" from slot "); Serial.println(slot_num);

// internal variables
bool re_rotation = false;       // true if rotation occurred while knob down
bool re_down = false;           // true while knob is down
Frequency re_down_time = 0; // milliseconds when knob is pressed down

// expecting rising edge on pinA - at detent
volatile byte aFlag = 0;
