 uint8_t usbstate;
 uint8_t laststate;
 uint8_t rcode;
-//uint8_t buf[sizeof(USB_DEVICE_DESCRIPTOR)];
 USB_DEVICE_DESCRIPTOR buf;
 OutParserState prsState; /* Parser */
 

  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);

    if ( (size = Midi.RecvData(outBuf)) > 0 ) {
      // Send data to parser
      parseMIDItoAppleBle(size, outBuf);
    }
  } while (size > 0);

 uint32_t err_code = NRF_SUCCESS;
}

/*******************************************************************************
 * Convert MIDI BLE to MIDI USB
 *******************************************************************************/
void parseBLEtoMIDI(uint8_t *dataptr, uint16_t bytesRead)
{
  uint8_t outBuffer[128];
  uint8_t outPtr = 0;
  uint8_t singByte; /* single byte from message */
