 #include <CATutil.h>
 #include <IcomCAT.h>
 
+/** LED which indicates that RX loop is 'locked'. */
 #define RX_LOCKED_LED     13
 
 #if defined (__AVR__)

// code snippet for XXX specific code fragment
#if defined(CORE_TEENSY) || defined(__AVR__) || defined(__ARM__)
// ...
#endif

  byte mode = Icom706.getMode();
  uint32_t frequency = Icom706.getFrequency();

  static byte rxState = 0;

  // set the rxState appropriately
  if ( frequency == IcomCAT::ILLEGAL_FREQ || mode == IcomCAT::ILLEGAL_MODE )
    rxState = 0;
  else if ( !rxFrequencyOK( Icom706 ) )
    rxState = 1;
  else if ( !rxModeOK( Icom706 ) )
    rxState = 2;
  else
    rxState = 3;

  if ( rxState == 3 )
    digitalWrite(RX_LOCKED_LED, HIGH);
  else
    digitalWrite(RX_LOCKED_LED, LOW);

  switch ( rxState ) {
    
    case 0: 
      rxRequestFrequencyAndMode(Icom706, frequency, mode);
