sh: use the common ascii hex helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Harvey Harrison
2008-05-12 12:05:43 -07:00
committed by Paul Mundt
parent 65b83427c6
commit bfd3c7a728
3 changed files with 9 additions and 24 deletions

View File

@ -184,15 +184,15 @@ static void put_string(struct sci_port *sci_port, const char *buffer, int count)
int h, l;
c = *p++;
h = highhex(c);
l = lowhex(c);
h = hex_asc_hi(c);
l = hex_asc_lo(c);
put_char(port, h);
put_char(port, l);
checksum += h + l;
}
put_char(port, '#');
put_char(port, highhex(checksum));
put_char(port, lowhex(checksum));
put_char(port, hex_asc_hi(checksum));
put_char(port, hex_asc_lo(checksum));
} while (get_char(port) != '+');
} else
#endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */