...
Code Block | ||
---|---|---|
| ||
//#define CONFSEL_VALIDATE 0 //#define CONFSEL_VALUE 1 //#define CONFSEL_MIN 2 //#define CONFSEL_MAX 3 //#define CONFSEL_DEFAULT 4 stringstream msg; char *tmp=NULL; int i=0; while((tmp = F_Get_Config_Name_List(i++)) != NULL && strcmp(tmp, "\0") != 0) { //Check if parameter name is correct, should be redundant if(F_Get_Config_Value_By_Name(tmp, 0)) { unsigned int val = F_Get_Config_Value_By_Name(tmp, 1); unsigned int min = F_Get_Config_Value_By_Name(tmp, 2); unsigned int max = F_Get_Config_Value_By_Name(tmp, 3); unsigned int def = F_Get_Config_Value_By_Name(tmp, 4); msg << tmp << "=0x" << hex << val << ", 0x" << hex << min << "<=X<=0x" << hex << max << "(def=0x" << hex << def << ")\r\n"; //sanity check on current value if(val < min || val > max) { msg << "======= " << tmp << " value outside min/max =======\r\n"; msg << "DLL failed to trim\r\n"; } //sanity check on default value if(def < min || def > max) { msg << "======= " << tmp << " default outside min/max =======\r\n"; msg << "Param default OUT OF RANGE\r\n"; } } else { msg << "config parameter name invalid " << tmp << "\r\n"; } } |
5. F_Set_Config_Value_By_Name
Anchor | ||||
---|---|---|---|---|
|
General Description
Set the current FPA’s configuration. Use F_Get_Config_Name_List to get configuration parameter names, then use them as input to this function. New value for configuration parameter will be trimmed by minimum and maximum values allowed for this parameter. If not initialized, this parameter will have a default value. Double check parameters after configuration using F_Get_Config_Value_By_Name.
...
Code Block language cpp // return Type + Version // Type 0x1000 - Single FlashPro430 - Parallel Port type // 0x2000 - Single FlashPro430 - USB type // 0x3000 - Single GangPro430 - USB type // 0x4000 - Single FlashPro-CC - USB type // 0x5000 - Single GangPro-CC - USB type // 0xA000 - Single FlashPro2000- USB type // 0xB000 - Single GangPro2000 - USB type // 0xE000 - Single FlashPro-ARM - USB type // 0xF000 - Single GangPro-ARM - USB type // Version = 0x0FFF & version
FPA_INVALID_NO (-2 or 0xFFFFFFFE) : FPA not opened with F_OpenInstancesAndFPAs or index out of range
15. F_ConfigFileLoad
Anchor | ||||
---|---|---|---|---|
|
General Description
Modify programmer’s configuration according to data taken from specified configuration file. This setup will override previous values and leave omitted parameters untouched. When loaded for the first time, unspecified configuration parameters take on default values as given by F_Get_Config_Value_By_Name. When calling this function multiple times with different configuration files, make sure to specify all relevant configuration parameters.
...