SLAU358Q September 2011 – October 2019
The MSPGANG_HW_devices function scanning all available COM ports and saving information about these ports in following structure.
#define MAX_COM_SIZE 60
#define HW_NAME_SIZE 30
typedef union
{
unsigned char bytes[HW_NAME_SIZE];
struct
{
unsigned short ComNo;
char ComName[7];
char description[HW_NAME_SIZE-2-7];
}x;
}COM_PORTS_DEF;
COM_PORTS_DEF *AvailableComPorts = NULL;
MSPGANG_HW_devices(MAX_COM_SIZE, (void **) &AvailableComPorts));
If detected, USB VCP information is placed at the first location.
Syntax
LONG MSPGANG_HW_devices(LONG max, void **AvailableComPorts)
Arguments
LONG max | |
void **AvailableComPorts |
Result
LONG | Error code |