Lines Matching refs:buf
32 static unsigned int debugifc_count_whitespace(const char *buf, in debugifc_count_whitespace() argument
39 ch = buf[scnt]; in debugifc_count_whitespace()
49 static unsigned int debugifc_count_nonwhitespace(const char *buf, in debugifc_count_nonwhitespace() argument
56 ch = buf[scnt]; in debugifc_count_nonwhitespace()
65 static unsigned int debugifc_isolate_word(const char *buf,unsigned int count, in debugifc_isolate_word() argument
76 scnt = debugifc_count_whitespace(buf,count); in debugifc_isolate_word()
77 consume_cnt += scnt; count -= scnt; buf += scnt; in debugifc_isolate_word()
80 scnt = debugifc_count_nonwhitespace(buf,count); in debugifc_isolate_word()
82 wptr = buf; in debugifc_isolate_word()
84 consume_cnt += scnt; count -= scnt; buf += scnt; in debugifc_isolate_word()
93 static int debugifc_parse_unsigned_number(const char *buf,unsigned int count, in debugifc_parse_unsigned_number() argument
98 if ((count >= 2) && (buf[0] == '0') && in debugifc_parse_unsigned_number()
99 ((buf[1] == 'x') || (buf[1] == 'X'))) { in debugifc_parse_unsigned_number()
102 buf += 2; in debugifc_parse_unsigned_number()
103 } else if ((count >= 1) && (buf[0] == '0')) { in debugifc_parse_unsigned_number()
108 int val = hex_to_bin(*buf++); in debugifc_parse_unsigned_number()
119 static int debugifc_match_keyword(const char *buf,unsigned int count, in debugifc_match_keyword() argument
126 return !memcmp(buf,keyword,kl); in debugifc_match_keyword()
130 int pvr2_debugifc_print_info(struct pvr2_hdw *hdw,char *buf,unsigned int acnt) in pvr2_debugifc_print_info() argument
134 ccnt = scnprintf(buf, acnt, "Driver hardware description: %s\n", in pvr2_debugifc_print_info()
136 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_info()
137 ccnt = scnprintf(buf,acnt,"Driver state info:\n"); in pvr2_debugifc_print_info()
138 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_info()
139 ccnt = pvr2_hdw_state_report(hdw,buf,acnt); in pvr2_debugifc_print_info()
140 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_info()
147 char *buf,unsigned int acnt) in pvr2_debugifc_print_status() argument
157 ccnt = scnprintf(buf,acnt,"USB link speed: %s\n", in pvr2_debugifc_print_status()
159 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_status()
165 ccnt = scnprintf(buf,acnt,"GPIO state: dir=0x%x in=0x%x out=0x%x\n", in pvr2_debugifc_print_status()
167 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_status()
169 ccnt = scnprintf(buf,acnt,"Streaming is %s\n", in pvr2_debugifc_print_status()
171 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_status()
178 buf,acnt, in pvr2_debugifc_print_status()
188 bcnt += ccnt; acnt -= ccnt; buf += ccnt; in pvr2_debugifc_print_status()
195 static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, in pvr2_debugifc_do1cmd() argument
202 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
204 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
209 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
211 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
236 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
238 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
241 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
243 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
269 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
271 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
278 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
280 count -= scnt; buf += scnt; in pvr2_debugifc_do1cmd()
284 scnt = debugifc_isolate_word(buf,count,&wptr,&wlen); in pvr2_debugifc_do1cmd()
305 int pvr2_debugifc_docmd(struct pvr2_hdw *hdw,const char *buf, in pvr2_debugifc_docmd() argument
313 if (buf[bcnt] == '\n') break; in pvr2_debugifc_docmd()
316 ret = pvr2_debugifc_do1cmd(hdw,buf,bcnt); in pvr2_debugifc_docmd()
319 buf += bcnt; in pvr2_debugifc_docmd()