|
ESP-IDF Firmware
Firmware architecture and call graph
|
#include <stdarg.h>#include <stdbool.h>#include <stdio.h>#include <stdio_ext.h>#include <string.h>#include <sys/errno.h>#include <sys/fcntl.h>#include <sys/lock.h>#include <sys/param.h>#include "esp_attr.h"#include "esp_log.h"#include "esp_vfs.h"#include "esp_vfs_dev.h"#include "tinyusb.h"#include "tusb_cdc_acm.h"#include "vfs_tinyusb.h"#include "sdkconfig.h"Go to the source code of this file.
Data Structures | |
| struct | vfs_tinyusb_t |
Macros | |
| #define | NONE -1 |
| #define | FD_CHECK(fd, ret_val) |
| #define | DEFAULT_TX_MODE ESP_LINE_ENDINGS_LF |
| #define | DEFAULT_RX_MODE ESP_LINE_ENDINGS_LF |
Functions | |
| static esp_err_t | apply_path (char const *path) |
| static esp_err_t | vfstusb_init (int cdc_intf, char const *path) |
| Fill s_vfstusb. | |
| static void | vfstusb_deinit (void) |
| Clear s_vfstusb to default values. | |
| static int | tusb_open (const char *path, int flags, int mode) |
| static ssize_t | tusb_write (int fd, const void *data, size_t size) |
| static int | tusb_close (int fd) |
| static ssize_t | tusb_read (int fd, void *data, size_t size) |
| static int | tusb_fstat (int fd, struct stat *st) |
| static int | tusb_fcntl (int fd, int cmd, int arg) |
| esp_err_t | esp_vfs_tusb_cdc_unregister (char const *path) |
| Unregister TinyUSB CDC from VFS. | |
| esp_err_t | esp_vfs_tusb_cdc_register (int cdc_intf, char const *path) |
| Register TinyUSB CDC at VFS with path. | |
Variables | |
| static const char * | TAG = "tusb_vfs" |
| static vfs_tinyusb_t | s_vfstusb |
| #define DEFAULT_RX_MODE ESP_LINE_ENDINGS_LF |
Definition at line 52 of file vfs_tinyusb.c.
Referenced by vfstusb_init().
| #define DEFAULT_TX_MODE ESP_LINE_ENDINGS_LF |
Definition at line 44 of file vfs_tinyusb.c.
Referenced by vfstusb_init().
| #define FD_CHECK | ( | fd, | |
| ret_val ) |
Definition at line 30 of file vfs_tinyusb.c.
Referenced by tusb_close(), tusb_fcntl(), tusb_fstat(), tusb_read(), and tusb_write().
| #define NONE -1 |
Definition at line 28 of file vfs_tinyusb.c.
Referenced by tusb_read().
|
static |
Definition at line 68 of file vfs_tinyusb.c.
References ESP_OK, s_vfstusb, TAG, VFS_TUSB_MAX_PATH, and VFS_TUSB_PATH_DEFAULT.
Referenced by vfstusb_init().
| esp_err_t esp_vfs_tusb_cdc_register | ( | int | cdc_intf, |
| char const * | path ) |
Register TinyUSB CDC at VFS with path.
| cdc_intf | - interface number of TinyUSB's CDC |
| path | - path where the CDC will be registered, /dev/tusb_cdc will be used if left NULL. |
Definition at line 256 of file vfs_tinyusb.c.
References ESP_LOGD, ESP_OK, s_vfstusb, TAG, tusb_cdc_acm_initialized(), tusb_close(), tusb_fcntl(), tusb_fstat(), tusb_open(), tusb_read(), tusb_write(), and vfstusb_init().
Referenced by esp_tusb_init_console().
| esp_err_t esp_vfs_tusb_cdc_unregister | ( | char const * | path | ) |
Unregister TinyUSB CDC from VFS.
| path | - path where the CDC will be unregistered if NULL will be used /dev/tusb_cdc |
Definition at line 224 of file vfs_tinyusb.c.
References ESP_LOGD, ESP_OK, s_vfstusb, TAG, VFS_TUSB_PATH_DEFAULT, and vfstusb_deinit().
Referenced by esp_tusb_deinit_console().
|
static |
Definition at line 151 of file vfs_tinyusb.c.
References FD_CHECK.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 205 of file vfs_tinyusb.c.
References FD_CHECK, and s_vfstusb.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 197 of file vfs_tinyusb.c.
References FD_CHECK.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 111 of file vfs_tinyusb.c.
References s_vfstusb.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 157 of file vfs_tinyusb.c.
References data, FD_CHECK, NONE, and s_vfstusb.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 119 of file vfs_tinyusb.c.
References data, FD_CHECK, s_vfstusb, and tinyusb_cdcacm_write_queue_char().
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Clear s_vfstusb to default values.
Definition at line 105 of file vfs_tinyusb.c.
References s_vfstusb.
Referenced by esp_vfs_tusb_cdc_unregister().
|
static |
Fill s_vfstusb.
| cdc_intf | - interface of tusb for registration |
| path | - a path where the CDC will be registered |
Definition at line 93 of file vfs_tinyusb.c.
References apply_path(), DEFAULT_RX_MODE, DEFAULT_TX_MODE, and s_vfstusb.
Referenced by esp_vfs_tusb_cdc_register().
|
static |
Definition at line 65 of file vfs_tinyusb.c.
Referenced by apply_path(), esp_vfs_tusb_cdc_register(), esp_vfs_tusb_cdc_unregister(), tusb_fcntl(), tusb_open(), tusb_read(), tusb_write(), vfstusb_deinit(), and vfstusb_init().
|
static |
Definition at line 25 of file vfs_tinyusb.c.