forked from ROMEO/obsw
Using write() for output for better portability
This commit is contained in:
15
bsp_z7/newlib/write.c
Normal file
15
bsp_z7/newlib/write.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "xil_printf.h"
|
||||
#include "xparameters.h"
|
||||
|
||||
int write(int file, char *ptr, int len) {
|
||||
if (ptr == NULL) {
|
||||
return 0;
|
||||
}
|
||||
// TODO file descriptors
|
||||
int todo;
|
||||
|
||||
for (todo = 0; todo < len; todo++) {
|
||||
outbyte(*ptr++);
|
||||
}
|
||||
return len;
|
||||
}
|
Reference in New Issue
Block a user