19 lines
379 B
C
19 lines
379 B
C
/* See LICENSE of license details. */
|
|
|
|
#include <errno.h>
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
|
|
ssize_t _bsp_write(int fd, const void *ptr, size_t len) {
|
|
const uint8_t *current = (const uint8_t *)ptr;
|
|
if (isatty(fd)) {
|
|
for (size_t jj = 0; jj < len; jj++) {
|
|
*((uint32_t *)0xFFFF0000) = current[jj];
|
|
}
|
|
return len;
|
|
}
|
|
|
|
return 1;
|
|
}
|