   uint32_t err_code = NRF_SUCCESS;
   uart_callback_t uart_cb;
   Serial.begin(9600);
-  // while (!Serial); // activate to wait for attached serial
 
   //Workaround for non UHS2.0 Shield
   pinMode(10, OUTPUT);

        case 0xff : //system realtime message
            msgSize = 1;
            break;
            
            //undefine messages
        default :
            break;


  if(rx_buf_num <= 100) // arbitrary high number
  {
    if (rx_buf_num % 17 == 0) // End of packet, start a new one
    {
      rx_buf[rx_buf_num] = blueMidiTime >> 8;
      rx_buf_num++;
      rx_buf[rx_buf_num] = 0x80;
      rx_buf_num++;
    }
    else
    {
      rx_buf[rx_buf_num] = 0x80;
      rx_buf_num++;
    }
    for (int i = 0; i < size; i++)
    {
      rx_buf[rx_buf_num] = outBuf[i];
      rx_buf_num++;
    }
  }
}

/*******************************************************************************
 * Convert USB Host debug info to Hex
 *******************************************************************************/
void print_hex(int v, int num_places)
{
  int mask = 0, n, num_nibbles, digit;
  for (n = 1; n <= num_places; n++)
  {
    mask = (mask << 1) | 0x0001;
  }
  v = v & mask; // truncate v to specified number of places

  num_nibbles = num_places / 4;
  if ((num_places % 4) != 0)
  {
    ++num_nibbles;
  }
  do
  {
    digit = ((v >> (num_nibbles - 1) * 4)) & 0x0f;
    DEBUG_PRINTHEX(digit);
  }
