Lines Matching refs:ch
172 hex(unsigned char ch) in hex() argument
174 if (ch >= 'a' && ch <= 'f') in hex()
175 return ch-'a'+10; in hex()
176 if (ch >= '0' && ch <= '9') in hex()
177 return ch-'0'; in hex()
178 if (ch >= 'A' && ch <= 'F') in hex()
179 return ch-'A'+10; in hex()
190 unsigned char ch; in mem2hex() local
195 ch = *mem++; in mem2hex()
196 *buf++ = hexchars[ch >> 4]; in mem2hex()
197 *buf++ = hexchars[ch & 0xf]; in mem2hex()
214 unsigned char ch; in hex2mem() local
219 ch = hex(*buf++) << 4; in hex2mem()
220 ch |= hex(*buf++); in hex2mem()
221 *mem++ = ch; in hex2mem()
271 unsigned char ch; in getpacket() local
276 while ((ch = (getDebugChar() & 0x7f)) != '$') ; in getpacket()
285 ch = getDebugChar() & 0x7f; in getpacket()
286 if (ch == '#') in getpacket()
288 checksum = checksum + ch; in getpacket()
289 buffer[count] = ch; in getpacket()
298 if (ch == '#') { in getpacket()
324 unsigned char ch, recv; in putpacket() local
332 while ((ch = buffer[count])) { in putpacket()
333 putDebugChar(ch); in putpacket()
334 checksum += ch; in putpacket()