Struct esp_idf_svc::sys::esp_flash_t
source · #[repr(C)]pub struct esp_flash_t {
pub host: *mut spi_flash_host_inst_t,
pub chip_drv: *const spi_flash_chip_t,
pub os_func: *const esp_flash_os_functions_t,
pub os_func_data: *mut c_void,
pub read_mode: u32,
pub size: u32,
pub chip_id: u32,
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4]>,
}
Expand description
@brief Structure to describe a SPI flash chip connected to the system.
Structure must be initialized before use (passed to esp_flash_init()). It’s in the public header because some instances should be allocated statically in the startup code. May be updated according to hardware version and new flash chip feature requirements, shouldn’t be treated as public API.
For advanced developers, you may replace some of them with your implementations at your own risk.
Fields§
§host: *mut spi_flash_host_inst_t
< Pointer to hardware-specific “host_driver” structure. Must be initialized before used.
chip_drv: *const spi_flash_chip_t
< Pointer to chip-model-specific “adapter” structure. If NULL, will be detected during initialisation.
os_func: *const esp_flash_os_functions_t
< Pointer to os-specific hook structure. Call esp_flash_init_os_functions()
to setup this field, after the host is properly initialized.
os_func_data: *mut c_void
< Pointer to argument for os-specific hooks. Left NULL and will be initialized with os_func
.
read_mode: u32
< Configured SPI flash read mode. Set before esp_flash_init
is called.
size: u32
< Size of SPI flash in bytes. If 0, size will be detected during initialisation. Note: this stands for the size in the binary image header. If you want to get the flash physical size, please call esp_flash_get_physical_size
.
chip_id: u32
< Detected chip id.
_bitfield_align_1: [u32; 0]
§_bitfield_1: __BindgenBitfieldUnit<[u8; 4]>
Implementations§
source§impl esp_flash_t
impl esp_flash_t
pub fn busy(&self) -> u32
pub fn set_busy(&mut self, val: u32)
pub fn hpm_dummy_ena(&self) -> u32
pub fn set_hpm_dummy_ena(&mut self, val: u32)
pub fn reserved_flags(&self) -> u32
pub fn set_reserved_flags(&mut self, val: u32)
pub fn new_bitfield_1( busy: u32, hpm_dummy_ena: u32, reserved_flags: u32, ) -> __BindgenBitfieldUnit<[u8; 4]>
Trait Implementations§
source§impl Clone for esp_flash_t
impl Clone for esp_flash_t
source§fn clone(&self) -> esp_flash_t
fn clone(&self) -> esp_flash_t
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for esp_flash_t
impl Debug for esp_flash_t
source§impl Default for esp_flash_t
impl Default for esp_flash_t
source§fn default() -> esp_flash_t
fn default() -> esp_flash_t
impl Copy for esp_flash_t
Auto Trait Implementations§
impl Freeze for esp_flash_t
impl RefUnwindSafe for esp_flash_t
impl !Send for esp_flash_t
impl !Sync for esp_flash_t
impl Unpin for esp_flash_t
impl UnwindSafe for esp_flash_t
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)