ARM9教程DSP教程FPGA教程CPLD教程12A软硬件设计0229
} } }
int _write( int fd, const char * buf, int size ) {
for ( fd = 0; fd < size; fd++ ) {
srl0_send_byte( Base_UART, *buf++, &transmit_buffer ); }
return size; }
int _read( int fd, char * buf, int size ) {
char val; int i;
for ( i = 0; i < size; i++ ) {
while ( srl0_receive_byte(&receive_buffer, &val) == 0 ); buf[i] = val; }
return i; }