/* Converts a text device path node to Bluetooth LE device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextBluetoothLE(IN CHAR16 *TextDeviceNode)
/* Converts a text device path node to Bluetooth LE device path structure. */
EFI_DEVICE_PATH_PROTOCOL* DevPathFromTextBluetoothLE(IN CHAR16 *TextDeviceNode)
{
  CHAR16                    *BluetoothLeAddrStr;
  CHAR16                    *BluetoothLeAddrTypeStr;
  BLUETOOTH_LE_DEVICE_PATH  *BluetoothLeDp;
  BluetoothLeAddrStr     = GetNextParamStr (&TextDeviceNode);
  BluetoothLeAddrTypeStr = GetNextParamStr (&TextDeviceNode);
  BluetoothLeDp          = (BLUETOOTH_LE_DEVICE_PATH *)CreateDeviceNode (
                                                         MESSAGING_DEVICE_PATH,
                                                         MSG_BLUETOOTH_LE_DP,
                                                         (UINT16)sizeof (BLUETOOTH_LE_DEVICE_PATH)
                                                         );
  BluetoothLeDp->Address.Type = (UINT8)Strtoi (BluetoothLeAddrTypeStr);
  StrHexToBytes (
    BluetoothLeAddrStr,
    sizeof (BluetoothLeDp->Address.Address) * 2,
    BluetoothLeDp->Address.Address,
    sizeof (BluetoothLeDp->Address.Address)
    );
  return (EFI_DEVICE_PATH_PROTOCOL *)BluetoothLeDp;
}