whiskers 0.2.0
RP2350 BadUSB Tool
Loading...
Searching...
No Matches
disk_info Struct Reference

Struct to hold disk information. More...

#include <shared.h>

Data Fields

bool disk_mounted
bool is_externally_writable
void * _internal_sdp
void * _internal_fsp
bool(* _internal_read_fp )(uint32_t, uint32_t, void *)
bool(* _internal_write_fp )(uint32_t, uint32_t, uint8_t *)
uint32_t _internal_blocksize
uint32_t _internal_sectorcount
HAL_ERROR errno

Detailed Description

Struct to hold disk information.

This struct is used realy just for holding the pointers to all the internal SD And FatFS information and returning error codes.

It can also be used to check the status of the disk and if it's mounted by the disk_mounted boolean.

Field Documentation

◆ _internal_blocksize

uint32_t disk_info::_internal_blocksize

Size of a block/sector of the device. DO NOT TOUCH THIS!

◆ _internal_fsp

void* disk_info::_internal_fsp

Internal FatFS filesystem pointer. DO NOT TOUCH THIS!

◆ _internal_read_fp

bool(* disk_info::_internal_read_fp) (uint32_t, uint32_t, void *)

Internal raw read function. Parameters are lba (sector), number of sectors to read, output buffer. DO NOT TOUCH THIS!

◆ _internal_sdp

void* disk_info::_internal_sdp

Internal SD structure pointer. DO NOT TOUCH THIS!

◆ _internal_sectorcount

uint32_t disk_info::_internal_sectorcount

Number of sectors in the device. DO NOT TOUCH THIS!

◆ _internal_write_fp

bool(* disk_info::_internal_write_fp) (uint32_t, uint32_t, uint8_t *)

Internal raw write function. Parameters are lba (sector), number of sectors to read, output buffer. DO NOT TOUCH THIS!

◆ disk_mounted

bool disk_info::disk_mounted

True/False if the disk is mounted.

◆ errno

HAL_ERROR disk_info::errno

Error number returned by the disk functions. This is only set if an actual error occured. See shared.h on how to convert these into strings.

◆ is_externally_writable

bool disk_info::is_externally_writable

True/False if the disk should be allowed writes to it externally from the host device. This is implicitly set to true after initializing the disk. Set to false before mounting the disk to make it read only.


The documentation for this struct was generated from the following file: