function config_ftdi
%usage:  config_ftdi()
%
%Configures FTDI UM245R USB high-speed digital I/O module driver
%to its default settings as follows:
%
% Function  Pin   Mode
% --------  ---   ----
%    DB0      1   Input
%    DB1      5   Input
%    DB2      3   Input
%    DB3     10   Input
%    DB4      2   Output
%    DB5      8   Output
%    DB6      9   Output
%    DB7      6   Output
%    GND      7   Digital Ground
%
%Use config_ftdi2(mode) to customize the I/O configuration
%See http://usd-apps.usd.edu/coglab/psyc770/USB245.html for detaills
%
global cogent;

%create USB245 interface object
cogent.io.ftdiObj = USB245();

%install the FTDI interface with standard I/O configuration
%status = 0 if installation successful
cogent.io.ftdiIOMask = 240; %D0-3=inputs, D4-7=outputs
cogent.io.ftdiStatus = USB245(cogent.io.ftdiObj);
if(cogent.io.ftdiStatus ~= 0)
    disp('FTDI installation failed!')
end

