diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
commit | 74b9ff28228e3858ef4bc181a34a9acf9ca6be79 (patch) | |
tree | 97d86198073500ef287f8298d6f8df713773d037 /device-functions.c | |
parent | 9f693eba66b3ff9934050fd4b5c50b7660cc3096 (diff) |
remove unused stopbit and echo settings
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/device-functions.c b/device-functions.c index 4753b28..8812cfa 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4622,17 +4622,8 @@ void Main_update_shift_registers() } -int IO_Setup_RS232(int baud, char stopbits, char hardhand, char echo, gboolean update_flash) +int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash) { - // debugging - printf ("baud: %d, stop bits %d, handshaking %d, echo %d\n\r", - baud, - stopbits, - hardhand, // 0 = none, 1 = hard - echo); - - // FIXME implement serial port changes here - FILE* configfile = fopen("/tmp/instgettyopts", "w"); if(configfile) { fprintf(configfile, "OPTS=-L %s\n", hardhand ? "-h" : ""); @@ -4641,22 +4632,16 @@ int IO_Setup_RS232(int baud, char stopbits, char hardhand, char echo, gboolean u system("systemctl --no-block restart inst-getty@ttyO5.service"); } - if (1) { // FIXME if changes are successful - globals.Flash.baud = baud; - globals.Flash.stopbits = stopbits; - globals.Flash.hardhand = hardhand; - globals.Flash.echo = echo; + globals.Flash.baud = baud; + globals.Flash.hardhand = hardhand; - if (update_flash) { - int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) + - sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo); + if (update_flash) { + int size = sizeof(globals.Flash.baud) + sizeof(globals.Flash.parity) + sizeof(globals.Flash.stopbits) + + sizeof(globals.Flash.databits) + sizeof(globals.Flash.hardhand) + sizeof(globals.Flash.echo); - int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start); - writeUserBlock(&globals.Flash, eprom_loc, size); - } - return OK; - } else { - return HardwareError; + int eprom_loc = (char *) &(globals.Flash.baud) - (char *) &(globals.Flash.flash_start); + writeUserBlock(&globals.Flash, eprom_loc, size); } + return OK; } |