MCP2200
Example:
<code>
Example:
<code>
if
(SimpleIOClass::ConfigureMCP2200(OutputPacket
Buffer) == SUCCESS)
lblStatusBar->Text = "Success";
else
lblStatusBar->Text = "Invalid command
" + SimpleIOClass::LastError;
</code>
if
(SimpleIOClass::ConfigureMCP2200(OutputPacket
Buffer) == SUCCESS)
lblStatusBar->Text = "Success";
else
lblStatusBar->Text = "Invalid command
" + SimpleIOClass::LastError;
</code>
2.3.1.10
fnUSBCFG
Remarks:
bool SimpleIOClass::fnUSBCFG (unsigned int
onOff)
Error code is returned in LastError
2.3.1.12
fnSetBaudRate
Summary:
Configures the USBCFG pin function.
bool SimpleIOClass::fnSetBaudRate (unsigned
long BaudRateParam)
Precondition:
The Vendor and Product ID must have been
specified by SimpleIOInit.
Summary:
Configures the device.
Parameters:
Precondition:
onOff (constant): ON or OFF.
The Vendor and Product ID must have been
specified by SimpleIOInit.
Returns:
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
Parameters:
IOMap - An array of configuration
parameters, one byte per IO Line
Example:
<code>
Returns:
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
if
(SimpleIOClass::ConfigureMCP2200(OutputPacket
Buffer) == SUCCESS)
Example:
<code>
lblStatusBar->Text = "Success";
else
lblStatusBar->Text = "Invalid command
" + SimpleIOClass::LastError;
</code>
if
(SimpleIOClass::ConfigureMCP2200(OutputPacket
Buffer) == SUCCESS)
lblStatusBar->Text = "Success";
else
Remarks:
Error code is returned in LastError
lblStatusBar->Text = "Invalid command
" + SimpleIOClass::LastError;
</code>
2.3.1.11
fnSuspend
bool SimpleIOClass::fnSuspend (unsigned int
onOff)
Remarks:
Error code is returned in LastError
Summary:
Configures the SSPND function
2.3.1.13
ConfigureIO
bool SimpleIOClass::ConfigureIO (unsigned
char IOMap)
Precondition:
The Vendor and Product ID must have been
specified by SimpleIOInit.
Summary:
Configures the IO pins for Digital Input,
Digital Output
Parameters:
onOff (constant): ON or OFF.
Description:
Returns:
IO Pins can be configured as Digital Input,
Digital Output
Function returns true if the transmission is
successful, returns False if there the
transmission fails.
DS22228A-page 12
2010 Microchip Technology Inc.