MCP2200
EXAMPLE 2-8:
if (SimpleIOClass::fnSuspend(1) == SUCCESS)
lblStatusBar->Text = “Success”;
else
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;
2.3.1.9
fnTxLED
Function:
bool SimpleIOClass::fnTxLED (unsigned int mode)
Summary:
Configures the Tx LED mode. Tx LED configuration will be stored in NVRAM.
Sets the Tx LED mode to one of the possible values.
Description:
Precondition: VID and PID must be previously set via a call to InitMCP2200(VID, PID).
Parameters:
Returns:
mode (constant): OFF, TOGGLE, BLINKSLOW, BLINKFAST
This function returns True if the transmission is successful and returns False if the transmission fails.
Error code is returned in LastError.
Remarks:
EXAMPLE 2-9:
if (SimpleIOClass::fnTxLED (BLINKSLOW) == SUCCESS)
lblStatusBar->Text = “Success”;
else
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;
2.3.1.10
Function:
fnULoad
bool SimpleIOClass::fnULoad (unsigned int onOff)
Summary:
Configures the GP1 pin of the MCP2200 to show the status of the USB configuration.
Description:
When the GP1 is designated to show the USB configuration status, the pin will start low (during
power-up or after Reset), and it will go high after the MCP2200 is successfully configured by the
host.
Precondition:
Parameters:
VID and PID must be previously set via a call to InitMCP2200(VID, PID).
onOff:
• ‘1’ GP1 will reflect the USB configuration status
• ‘0’ GP1 will not reflect the USB configuration status (can be used as GPIO)
Returns:
This function returns True if the transmission is successful and returns False if the transmission fails.
Remarks:
Error code is returned in LastError.
EXAMPLE 2-10:
if (SimpleIOClass::fnULoad(1) == SUCCESS)
lblStatusBar->Text = “Success”;
else
lblStatusBar->Text = “Invalid command ” + SimpleIOClass::LastError;
DS22228B-page 16
2011 Microchip Technology Inc.