Lines Matching refs:ch
219 hex(unsigned char ch) in hex() argument
221 if (ch >= 'a' && ch <= 'f') in hex()
222 return ch-'a'+10; in hex()
223 if (ch >= '0' && ch <= '9') in hex()
224 return ch-'0'; in hex()
225 if (ch >= 'A' && ch <= 'F') in hex()
226 return ch-'A'+10; in hex()
238 unsigned char ch; in getpacket() local
242 while ((ch = (getDebugChar() & 0x7f)) != '$') ; in getpacket()
251 ch = getDebugChar() & 0x7f; in getpacket()
252 if (ch == '#') in getpacket()
254 checksum = checksum + ch; in getpacket()
255 buffer[count] = ch; in getpacket()
264 if (ch == '#') { in getpacket()
292 unsigned char ch, recv; in putpacket() local
300 while ((ch = buffer[count])) { in putpacket()
301 putDebugChar(ch); in putpacket()
302 checksum += ch; in putpacket()
324 unsigned char ch; in mem2hex() local
345 : "=r" (mem), "=r" (ch) : "0" (mem)); in mem2hex()
346 *buf++ = hexchars[ch >> 4]; in mem2hex()
347 *buf++ = hexchars[ch & 0xf]; in mem2hex()
361 unsigned char ch; in hex2mem() local
365 ch = hex(*buf++) << 4; in hex2mem()
366 ch |= hex(*buf++); in hex2mem()
381 : "=r" (mem) : "r" (ch) , "0" (mem)); in hex2mem()