Struct esp_idf_sys::esp_vfs_t

source ·
#[repr(C)]
pub struct esp_vfs_t {
Show 41 fields pub flags: c_int, pub __bindgen_anon_1: esp_vfs_t__bindgen_ty_1, pub __bindgen_anon_2: esp_vfs_t__bindgen_ty_2, pub __bindgen_anon_3: esp_vfs_t__bindgen_ty_3, pub __bindgen_anon_4: esp_vfs_t__bindgen_ty_4, pub __bindgen_anon_5: esp_vfs_t__bindgen_ty_5, pub __bindgen_anon_6: esp_vfs_t__bindgen_ty_6, pub __bindgen_anon_7: esp_vfs_t__bindgen_ty_7, pub __bindgen_anon_8: esp_vfs_t__bindgen_ty_8, pub __bindgen_anon_9: esp_vfs_t__bindgen_ty_9, pub __bindgen_anon_10: esp_vfs_t__bindgen_ty_10, pub __bindgen_anon_11: esp_vfs_t__bindgen_ty_11, pub __bindgen_anon_12: esp_vfs_t__bindgen_ty_12, pub __bindgen_anon_13: esp_vfs_t__bindgen_ty_13, pub __bindgen_anon_14: esp_vfs_t__bindgen_ty_14, pub __bindgen_anon_15: esp_vfs_t__bindgen_ty_15, pub __bindgen_anon_16: esp_vfs_t__bindgen_ty_16, pub __bindgen_anon_17: esp_vfs_t__bindgen_ty_17, pub __bindgen_anon_18: esp_vfs_t__bindgen_ty_18, pub __bindgen_anon_19: esp_vfs_t__bindgen_ty_19, pub __bindgen_anon_20: esp_vfs_t__bindgen_ty_20, pub __bindgen_anon_21: esp_vfs_t__bindgen_ty_21, pub __bindgen_anon_22: esp_vfs_t__bindgen_ty_22, pub __bindgen_anon_23: esp_vfs_t__bindgen_ty_23, pub __bindgen_anon_24: esp_vfs_t__bindgen_ty_24, pub __bindgen_anon_25: esp_vfs_t__bindgen_ty_25, pub __bindgen_anon_26: esp_vfs_t__bindgen_ty_26, pub __bindgen_anon_27: esp_vfs_t__bindgen_ty_27, pub __bindgen_anon_28: esp_vfs_t__bindgen_ty_28, pub __bindgen_anon_29: esp_vfs_t__bindgen_ty_29, pub __bindgen_anon_30: esp_vfs_t__bindgen_ty_30, pub __bindgen_anon_31: esp_vfs_t__bindgen_ty_31, pub __bindgen_anon_32: esp_vfs_t__bindgen_ty_32, pub __bindgen_anon_33: esp_vfs_t__bindgen_ty_33, pub __bindgen_anon_34: esp_vfs_t__bindgen_ty_34, pub start_select: Option<unsafe extern "C" fn(nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, exceptfds: *mut fd_set, sem: esp_vfs_select_sem_t, end_select_args: *mut *mut c_void) -> esp_err_t>, pub socket_select: Option<unsafe extern "C" fn(nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timeval) -> c_int>, pub stop_socket_select: Option<unsafe extern "C" fn(sem: *mut c_void)>, pub stop_socket_select_isr: Option<unsafe extern "C" fn(sem: *mut c_void, woken: *mut BaseType_t)>, pub get_socket_select_semaphore: Option<unsafe extern "C" fn() -> *mut c_void>, pub end_select: Option<unsafe extern "C" fn(end_select_args: *mut c_void) -> esp_err_t>,
}
Expand description

@brief VFS definition structure

This structure should be filled with pointers to corresponding FS driver functions.

VFS component will translate all FDs so that the filesystem implementation sees them starting at zero. The caller sees a global FD which is prefixed with an pre-filesystem-implementation.

Some FS implementations expect some state (e.g. pointer to some structure) to be passed in as a first argument. For these implementations, populate the members of this structure which have _p suffix, set flags member to ESP_VFS_FLAG_CONTEXT_PTR and provide the context pointer to esp_vfs_register function. If the implementation doesn’t use this extra argument, populate the members without _p suffix and set flags member to ESP_VFS_FLAG_DEFAULT.

If the FS driver doesn’t provide some of the functions, set corresponding members to NULL.

Fields§

§flags: c_int

< ESP_VFS_FLAG_CONTEXT_PTR or ESP_VFS_FLAG_DEFAULT

§__bindgen_anon_1: esp_vfs_t__bindgen_ty_1§__bindgen_anon_2: esp_vfs_t__bindgen_ty_2§__bindgen_anon_3: esp_vfs_t__bindgen_ty_3§__bindgen_anon_4: esp_vfs_t__bindgen_ty_4§__bindgen_anon_5: esp_vfs_t__bindgen_ty_5§__bindgen_anon_6: esp_vfs_t__bindgen_ty_6§__bindgen_anon_7: esp_vfs_t__bindgen_ty_7§__bindgen_anon_8: esp_vfs_t__bindgen_ty_8§__bindgen_anon_9: esp_vfs_t__bindgen_ty_9§__bindgen_anon_10: esp_vfs_t__bindgen_ty_10§__bindgen_anon_11: esp_vfs_t__bindgen_ty_11§__bindgen_anon_12: esp_vfs_t__bindgen_ty_12§__bindgen_anon_13: esp_vfs_t__bindgen_ty_13§__bindgen_anon_14: esp_vfs_t__bindgen_ty_14§__bindgen_anon_15: esp_vfs_t__bindgen_ty_15§__bindgen_anon_16: esp_vfs_t__bindgen_ty_16§__bindgen_anon_17: esp_vfs_t__bindgen_ty_17§__bindgen_anon_18: esp_vfs_t__bindgen_ty_18§__bindgen_anon_19: esp_vfs_t__bindgen_ty_19§__bindgen_anon_20: esp_vfs_t__bindgen_ty_20§__bindgen_anon_21: esp_vfs_t__bindgen_ty_21§__bindgen_anon_22: esp_vfs_t__bindgen_ty_22§__bindgen_anon_23: esp_vfs_t__bindgen_ty_23§__bindgen_anon_24: esp_vfs_t__bindgen_ty_24§__bindgen_anon_25: esp_vfs_t__bindgen_ty_25§__bindgen_anon_26: esp_vfs_t__bindgen_ty_26§__bindgen_anon_27: esp_vfs_t__bindgen_ty_27§__bindgen_anon_28: esp_vfs_t__bindgen_ty_28§__bindgen_anon_29: esp_vfs_t__bindgen_ty_29§__bindgen_anon_30: esp_vfs_t__bindgen_ty_30§__bindgen_anon_31: esp_vfs_t__bindgen_ty_31§__bindgen_anon_32: esp_vfs_t__bindgen_ty_32§__bindgen_anon_33: esp_vfs_t__bindgen_ty_33§__bindgen_anon_34: esp_vfs_t__bindgen_ty_34§start_select: Option<unsafe extern "C" fn(nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, exceptfds: *mut fd_set, sem: esp_vfs_select_sem_t, end_select_args: *mut *mut c_void) -> esp_err_t>

start_select is called for setting up synchronous I/O multiplexing of the desired file descriptors in the given VFS

§socket_select: Option<unsafe extern "C" fn(nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timeval) -> c_int>

socket select function for socket FDs with the functionality of POSIX select(); this should be set only for the socket VFS

§stop_socket_select: Option<unsafe extern "C" fn(sem: *mut c_void)>

called by VFS to interrupt the socket_select call when select is activated from a non-socket VFS driver; set only for the socket driver

§stop_socket_select_isr: Option<unsafe extern "C" fn(sem: *mut c_void, woken: *mut BaseType_t)>

stop_socket_select which can be called from ISR; set only for the socket driver

§get_socket_select_semaphore: Option<unsafe extern "C" fn() -> *mut c_void>

end_select is called to stop the I/O multiplexing and deinitialize the environment created by start_select for the given VFS

§end_select: Option<unsafe extern "C" fn(end_select_args: *mut c_void) -> esp_err_t>

get_socket_select_semaphore returns semaphore allocated in the socket driver; set only for the socket driver

Trait Implementations§

source§

impl Clone for esp_vfs_t

source§

fn clone(&self) -> esp_vfs_t

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for esp_vfs_t

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for esp_vfs_t

Auto Trait Implementations§

§

impl RefUnwindSafe for esp_vfs_t

§

impl Send for esp_vfs_t

§

impl Sync for esp_vfs_t

§

impl Unpin for esp_vfs_t

§

impl UnwindSafe for esp_vfs_t

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.