__u32 serial_gets_nommu(char* buf, __u32 n) { __u32 i; char c; for (i=0; i<n; i++) { c = serial_get_char_nommu(); if (c == 0) break; buf[i] = c; } return i+1; }
__u32 serial_gets_nommu(char* buf, __u32 n) { __u32 i = 0; char c = '\0'; if(0 == serial_inited_flag){ return FAIL; } for (i=0; i<n; i++) { c = serial_get_char_nommu(); if (c == 0) break; buf[i] = c; } return i+1; }