mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-15 01:29:00 +08:00
43 lines
751 B
C
43 lines
751 B
C
#include "mcu.h"
|
|
|
|
int _write(int fd, char *ptr, int len) {
|
|
(void) fd, (void) ptr, (void) len;
|
|
if (fd == 1) uart_write_buf(UART3, ptr, (size_t) len);
|
|
return len;
|
|
}
|
|
|
|
int _fstat(int fd, struct stat *st) {
|
|
(void) fd, (void) st;
|
|
return -1;
|
|
}
|
|
|
|
void *_sbrk(int incr) {
|
|
extern char _end;
|
|
static unsigned char *heap = NULL;
|
|
unsigned char *prev_heap;
|
|
if (heap == NULL) heap = (unsigned char *) &_end;
|
|
prev_heap = heap;
|
|
heap += incr;
|
|
return prev_heap;
|
|
}
|
|
|
|
int _close(int fd) {
|
|
(void) fd;
|
|
return -1;
|
|
}
|
|
|
|
int _isatty(int fd) {
|
|
(void) fd;
|
|
return 1;
|
|
}
|
|
|
|
int _read(int fd, char *ptr, int len) {
|
|
(void) fd, (void) ptr, (void) len;
|
|
return -1;
|
|
}
|
|
|
|
int _lseek(int fd, int ptr, int dir) {
|
|
(void) fd, (void) ptr, (void) dir;
|
|
return 0;
|
|
}
|