Displaying 1 result from an estimated 1 matches for "speed_table".
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...ALUE, "baudrate", "serial line speed");
addvar (VAR_VALUE, "max_load", "rated VA load VA");
}
void upsdrv_banner(void)
{
printf("Network UPS Tools - Best Fortress UPS driver 0.01 (%s)\n\n", UPS_VERSION);
}
struct {
char * val;
speed_t speed;
} speed_table[] = {
{"1200", B1200},
{"2400", B2400},
{"4800", B4800},
{"9600", B9600},
{NULL, B1200},
};
void upsdrv_initups(void) {
speed_t speed = B1200;
char * speed_val = getval("baudrate");
char * max_load = getval("max_load");
if (max...