#FT_DEVICE (DWORD)
if ~isdefined(:FT_DEVICE_232BM)
  export FT_DEVICE_232BM, FT_DEVICE_232AM, FT_DEVICE_100AX
  export FT_DEVICE_UNKNOWN, FT_DEVICE_2232C, FT_DEVICE_232R
  export FT_DEVICE_2232H, FT_DEVICE_4232H, FT_DEVICE_232H
  export FT_DEVICE_X_SERIES
  const FT_DEVICE_232BM = 0 # PFT_EEPROM_232B
  const FT_DEVICE_232AM = 1 # discontinued device
  const FT_DEVICE_100AX = 2 # discontinued device
  const FT_DEVICE_UNKNOWN = 3
  const FT_DEVICE_2232C = 4 # PFT_EEPROM_2232
  const FT_DEVICE_232R = 5 # PFT_EEPROM_232R
  const FT_DEVICE_2232H = 6 # PFT_EEPROM_2232H
  const FT_DEVICE_4232H = 7 # PFT_EEPROM_4232H
  const FT_DEVICE_232H = 8 # PFT_EEPROM_232H
  const FT_DEVICE_X_SERIES = 9 # PFT_EEPROM_X_SERIES
  const FT_DEVICE_4222H_0 = 10 # 
  const FT_DEVICE_4222H_1_2 = 11 # 
  const FT_DEVICE_4222H_3 = 12 # 
  const FT_DEVICE_4222_PROG =13 # 

  export ftdevicetypedict
  ftdevicetypedict = Dict(
    FT_DEVICE_232BM => "232BM",
    FT_DEVICE_232AM => "232AM",
    FT_DEVICE_100AX => "100AX",
    FT_DEVICE_UNKNOWN => "UNKNOWN",
    FT_DEVICE_2232C => "2232C",
    FT_DEVICE_232R => "232R",
    FT_DEVICE_2232H => "2232H",
    FT_DEVICE_4232H => "4232H",
    FT_DEVICE_232H => "232H",
    FT_DEVICE_X_SERIES => "X_SERIES",
    FT_DEVICE_4222H_0 => "FT_DEVICE_4222H_0",
    FT_DEVICE_4222H_1_2 => "FT_DEVICE_4222H_1_2",
    FT_DEVICE_4222H_3 => "FT_DEVICE_4222H_3",
    FT_DEVICE_4222_PROG => "FT_DEVICE_4222_PROG")
end