Lines Matching refs:ch
100 static int hex(unsigned char ch);
120 static int hex(unsigned char ch) in hex() argument
122 if (ch >= 'a' && ch <= 'f') in hex()
123 return ch-'a'+10; in hex()
124 if (ch >= '0' && ch <= '9') in hex()
125 return ch-'0'; in hex()
126 if (ch >= 'A' && ch <= 'F') in hex()
127 return ch-'A'+10; in hex()
140 unsigned char ch; in getpacket() local
147 while ((ch = (getDebugChar() & 0x7f)) != '$') ; in getpacket()
157 ch = getDebugChar() & 0x7f; in getpacket()
158 if (ch == '#') in getpacket()
160 checksum = checksum + ch; in getpacket()
161 buffer[count] = ch; in getpacket()
170 if (ch == '#') { in getpacket()
207 unsigned char ch; in putpacket() local
218 while ((ch = buffer[count]) != 0) { in putpacket()
219 if (!(putDebugChar(ch))) in putpacket()
221 checksum += ch; in putpacket()
244 unsigned char ch; in mem2hex() local
249 ch = *(mem++); in mem2hex()
252 *buf++ = hexchars[ch >> 4]; in mem2hex()
253 *buf++ = hexchars[ch & 0xf]; in mem2hex()
270 unsigned char ch; in hex2mem() local
276 ch = hex(*buf++) << 4; in hex2mem()
277 ch |= hex(*buf++); in hex2mem()
278 *(mem++) = ch; in hex2mem()