RT-Thread RTOS
An open source embedded real-time operating system
+ Collaboration diagram for blk:

Data Structures

struct  rt_blk_disk
 
struct  rt_blk_disk_ops
 
struct  rt_blk_device
 

Functions

rt_err_t rt_hw_blk_disk_register (struct rt_blk_disk *disk)
 
rt_err_t rt_hw_blk_disk_unregister (struct rt_blk_disk *disk)
 
rt_err_t rt_blk_disk_probe_partition (struct rt_blk_disk *disk)
 
rt_ssize_t rt_blk_disk_get_capacity (struct rt_blk_disk *disk)
 
rt_ssize_t rt_blk_disk_get_logical_block_size (struct rt_blk_disk *disk)
 

Detailed Description

blk driver api

Function Documentation

◆ rt_hw_blk_disk_register()

rt_err_t rt_hw_blk_disk_register ( struct rt_blk_disk disk)

Register the blk disk device.

Parameters
diskPoint to blk disk
Returns
rt_err_t error code

◆ rt_hw_blk_disk_unregister()

rt_err_t rt_hw_blk_disk_unregister ( struct rt_blk_disk disk)

Unregister the blk disk device.

Parameters
diskPoint to blk disk
Returns
rt_err_t error code

◆ rt_blk_disk_probe_partition()

rt_err_t rt_blk_disk_probe_partition ( struct rt_blk_disk disk)

Probe and register the blk disk partition.

Parameters
diskPoint to blk disk
Returns
rt_err_t error code

◆ rt_blk_disk_get_capacity()

rt_ssize_t rt_blk_disk_get_capacity ( struct rt_blk_disk disk)

Get the blk disk capacity.

Parameters
diskPoint to blk disk
Returns
rt_ssize_t sector count or error code

◆ rt_blk_disk_get_logical_block_size()

rt_ssize_t rt_blk_disk_get_logical_block_size ( struct rt_blk_disk disk)

Get the sector size.

Parameters
diskPoint to blk disk
Returns
rt_ssize_t bytes per sector or error code