Commit graph

30 commits

Author SHA1 Message Date
Roland Dobai
70c9b1ca22 VFS: Allocate socket select semaphore outside ISR 2019-05-15 10:50:49 +02:00
Roland Dobai
1d4eeeb464 VFS: Implement poll() based on select()
Closes https://github.com/espressif/esp-idf/issues/2945
2019-03-04 08:02:03 +01:00
Roland Dobai
5395435816 Add basic support for termios.h
Closes https://github.com/espressif/esp-idf/issues/2063
2018-08-30 14:29:20 +02:00
David Cermak
1ef13c524c asio: initial idf port of asio library without ssl 2018-07-30 06:28:43 +00:00
Renz Bagaporo
ea711f2ee9 vfs, fatfs: Add file truncate for fatfs 2018-06-14 06:37:21 +08:00
Roland Dobai
15b26f8841 VFS: esp_vfs_select() needs to be callable from concurrent tasks
This fix is for compatibility with lwip_select(). It moves the lock to
UART which is the only VFS driver which is implemented and is not
"thread-safe".
2018-05-29 11:01:25 +02:00
Angus Gratton
af2cb3ba8b Merge branch 'feature/vfs_find_free_fd' into 'master'
Add "find file descriptor" API to be used by VFS drivers

See merge request idf/esp-idf!2389
2018-05-18 15:22:20 +08:00
Roland Dobai
18e83bcd53 Allow VFS file descriptors in select() 2018-05-18 08:06:33 +02:00
Roland Dobai
2aa9c15906 VFS: allow to find free file descriptors & register them 2018-05-18 07:57:35 +02:00
Roland Dobai
4345e198ce Implement VFS support for access()
Closes https://github.com/espressif/esp-idf/issues/1085
2018-05-14 09:04:18 +02:00
Roland Dobai
5129bca67c VFS: Use smaller numbers as file descriptors 2018-05-07 09:01:56 +02:00
Ivan Grokhotkov
6185e722c3 Revert "Merge branch 'feature/vfs_select' into 'master'"
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Roland Dobai
6852d653bd Allow VFS file descriptors in select() 2018-04-17 11:25:30 +02:00
Ivan Grokhotkov
552ba35da5 add missing ioctl declaration
Previously ioctl was declared as a macro in lwip/sockets.h.
Disabling LWIP_POSIX_SOCKETS_IO_NAMES removed that declaration.

This adds sys/ioctl.h file and the missing declaration.
Also adds missing includes in vfs.c.
2017-10-23 19:47:33 +08:00
Angus Gratton
e5ae0f5927 lwip: Make LWIP_SOCKET_OFFSET signed, remove need for underflow check
This reverts commit 541493d877.
2017-10-20 18:04:28 +08:00
Ivan Grokhotkov
502c3d0243 vfs,fat: add fsync to VFS interface, implement it for fatfs 2017-10-17 15:14:53 +08:00
Angus Gratton
539262b5c2 vfs: Remove fd_offset member
This was intended for integrating LWIP, but a different approach was used.
2017-10-16 09:45:50 +08:00
Angus Gratton
4a9d4587b7 vfs: Add C++ guards to esp_vfs_dev.h
Closes https://github.com/espressif/esp-idf/issues/1069
2017-10-16 09:45:50 +08:00
Angus Gratton
3ebf7923d3 lwip: Route LWIP socket POSIX I/O functions via IDF VFS layer
No more conflicts between LWIP & newlib read(), write(), fcntl(), etc.

select() still only works if all of the fds are sockets.

Closes https://github.com/espressif/esp-idf/issues/273
2017-10-16 09:45:49 +08:00
Angus Gratton
a320fed3b5 vfs: Add ioctl() to filesystem set 2017-10-16 09:45:49 +08:00
Ivan Grokhotkov
1e4587a09f vfs: implement fcntl via VFS interface 2017-08-21 15:58:28 +08:00
Ivan Grokhotkov
489c523870 vfs: support for blocking reads, more newline conversion options
Previously VFS driver for UART could only use simple non-blocking
functions to read from and write to the UART. UART driver provides more
complex blocking and interrupt-driven functions, which can be used
instead.
This commit adds optional support for using UART driver's functions.

Also added is a more flexible mechanism for configuring newline
conversion rules on input and output.

This commit also fixes a bug that all UARTs shared one static variable
used as a character buffer in newline conversion code. This variable is
changed to be per-UART.
2017-08-21 15:58:28 +08:00
Deomid Ryabkov
b8782bdd90 Change esp_vfs_t.write return value to ssize_t
write() should return ssize_t, not size_t.
2017-06-09 21:24:00 +01:00
Ivan Grokhotkov
6fb430f45e vfs: add directory APIs 2017-01-09 04:51:24 +08:00
Ivan Grokhotkov
3f889de5ab vfs: implement vfs_unregister 2017-01-09 04:51:24 +08:00
Ivan Grokhotkov
13d4734399 docs: fix Doxygen warnings, fail CI build on Doxygen warnings 2016-11-16 22:44:22 +08:00
Ivan Grokhotkov
6f1d3ce4a7 vfs: code review fixes
- fix typo in readme
- remove unneeded extern declaration
- fix header guard macro
- tabs->spaces in syscalls.c
- spaces->tabs in tasks.c
2016-10-27 17:25:38 +08:00
Ivan Grokhotkov
7e201c5527 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
2016-10-27 17:22:18 +08:00
Ivan Grokhotkov
587360363c vfs: add UART device
This should be integrated with UART driver once everything is merged
2016-10-27 17:18:43 +08:00
Ivan Grokhotkov
401f6e4713 vfs: initial version of virtual filesystem API 2016-10-27 17:18:43 +08:00