obsw/bsp_z7/newlib/write.c

15 lines
250 B
C

#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;
}