Lines Matching refs:ch
169 hex(unsigned char ch) in hex() argument
171 if (ch >= 'a' && ch <= 'f') in hex()
172 return ch-'a'+10; in hex()
173 if (ch >= '0' && ch <= '9') in hex()
174 return ch-'0'; in hex()
175 if (ch >= 'A' && ch <= 'F') in hex()
176 return ch-'A'+10; in hex()
187 unsigned char ch; in mem2hex() local
192 ch = *mem++; in mem2hex()
193 *buf++ = hexchars[ch >> 4]; in mem2hex()
194 *buf++ = hexchars[ch & 0xf]; in mem2hex()
211 unsigned char ch; in hex2mem() local
216 ch = hex(*buf++) << 4; in hex2mem()
217 ch |= hex(*buf++); in hex2mem()
218 *mem++ = ch; in hex2mem()
268 unsigned char ch; in getpacket() local
273 while ((ch = (getDebugChar() & 0x7f)) != '$') ; in getpacket()
282 ch = getDebugChar() & 0x7f; in getpacket()
283 if (ch == '#') in getpacket()
285 checksum = checksum + ch; in getpacket()
286 buffer[count] = ch; in getpacket()
295 if (ch == '#') { in getpacket()
321 unsigned char ch, recv; in putpacket() local
329 while ((ch = buffer[count])) { in putpacket()
330 putDebugChar(ch); in putpacket()
331 checksum += ch; in putpacket()