move definitions for symbolicnames to correct palce for dependencies;

allow ConnectionTypes to be case insensitive
This commit is contained in:
marschap
2007-10-14 10:42:15 +00:00
parent 0899cef23d
commit 335fc84785
3 changed files with 27 additions and 26 deletions
+3 -1
View File
@@ -168,7 +168,7 @@ HD44780_init(Driver *drvthis)
// Get and search for the connection type
s = drvthis->config_get_string(drvthis->name, "ConnectionType", 0, "4bit");
for (i = 0; (connectionMapping[i].name != NULL) &&
(strcmp(s, connectionMapping[i].name) != 0); i++);
(strcasecmp(s, connectionMapping[i].name) != 0); i++);
if (connectionMapping[i].name == NULL) {
report(RPT_ERR, "%s: unknown ConnectionType: %s", drvthis->name, s);
return -1; // fatal error
@@ -176,6 +176,8 @@ HD44780_init(Driver *drvthis)
/* set connection type */
p->connectiontype = connectionMapping[i].connectiontype;
report(RPT_INFO,"HD44780: using ConnectionType: %s", connectionMapping[i].name);
if_type = connectionMapping[i].if_type;
init_fn = connectionMapping[i].init_fn;
}