vfs and newlib: small fixes

- spaces->tabs in tasks.c
- update vfs_uart.c to use per-UART locks
- add license to vfs_uart.c
- allocate separate streams for stdout, stdin, stderr, so that they can be independently reassigned
- fix build system test failure
- use posix off_t instead of newlib internal _off_t
This commit is contained in:
Ivan Grokhotkov
2016-10-26 14:05:56 +08:00
parent 0c130ecf19
commit 7e201c5527
5 changed files with 32 additions and 25 deletions

View File

@@ -164,9 +164,10 @@ void start_cpu0_default(void)
esp_setup_syscalls();
esp_vfs_dev_uart_register();
esp_reent_init(_GLOBAL_REENT);
_GLOBAL_REENT->_stdout = fopen("/dev/uart/0", "w"); // use fdopen here?
_GLOBAL_REENT->_stderr = _GLOBAL_REENT->_stdout;
_GLOBAL_REENT->_stdin = _GLOBAL_REENT->_stdout;
const char* default_uart_dev = "/dev/uart/0";
_GLOBAL_REENT->_stdout = fopen(default_uart_dev, "w");
_GLOBAL_REENT->_stderr = fopen(default_uart_dev, "w");
_GLOBAL_REENT->_stdin = fopen(default_uart_dev, "r");
do_global_ctors();
esp_ipc_init();
spi_flash_init();