BaseBlockDevice now extends BaseObject.
git-svn-id: https://svn.code.sf.net/p/chibios/svn2/trunk@11549 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
f89581412a
commit
e8dda5f8ee
|
@ -61,6 +61,7 @@ typedef struct {
|
||||||
* @brief @p BaseBlockDevice specific methods.
|
* @brief @p BaseBlockDevice specific methods.
|
||||||
*/
|
*/
|
||||||
#define _base_block_device_methods \
|
#define _base_block_device_methods \
|
||||||
|
_base_object_methods \
|
||||||
/* Removable media detection.*/ \
|
/* Removable media detection.*/ \
|
||||||
bool (*is_inserted)(void *instance); \
|
bool (*is_inserted)(void *instance); \
|
||||||
/* Removable write protection detection.*/ \
|
/* Removable write protection detection.*/ \
|
||||||
|
@ -84,6 +85,7 @@ typedef struct {
|
||||||
* @brief @p BaseBlockDevice specific data.
|
* @brief @p BaseBlockDevice specific data.
|
||||||
*/
|
*/
|
||||||
#define _base_block_device_data \
|
#define _base_block_device_data \
|
||||||
|
_base_object_data \
|
||||||
/* Driver state.*/ \
|
/* Driver state.*/ \
|
||||||
blkstate_t state;
|
blkstate_t state;
|
||||||
|
|
||||||
|
@ -95,6 +97,8 @@ struct BaseBlockDeviceVMT {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @extends BaseObject
|
||||||
|
*
|
||||||
* @brief Base block device class.
|
* @brief Base block device class.
|
||||||
* @details This class represents a generic, block-accessible, device.
|
* @details This class represents a generic, block-accessible, device.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,6 +53,7 @@ static bool mmc_write(void *instance, uint32_t startblk,
|
||||||
* @brief Virtual methods table.
|
* @brief Virtual methods table.
|
||||||
*/
|
*/
|
||||||
static const struct MMCDriverVMT mmc_vmt = {
|
static const struct MMCDriverVMT mmc_vmt = {
|
||||||
|
(size_t)0,
|
||||||
(bool (*)(void *))mmc_lld_is_card_inserted,
|
(bool (*)(void *))mmc_lld_is_card_inserted,
|
||||||
(bool (*)(void *))mmc_lld_is_write_protected,
|
(bool (*)(void *))mmc_lld_is_write_protected,
|
||||||
(bool (*)(void *))mmcConnect,
|
(bool (*)(void *))mmcConnect,
|
||||||
|
|
|
@ -72,6 +72,7 @@ typedef enum {
|
||||||
* @brief Virtual methods table.
|
* @brief Virtual methods table.
|
||||||
*/
|
*/
|
||||||
static const struct SDCDriverVMT sdc_vmt = {
|
static const struct SDCDriverVMT sdc_vmt = {
|
||||||
|
(size_t)0,
|
||||||
(bool (*)(void *))sdc_lld_is_card_inserted,
|
(bool (*)(void *))sdc_lld_is_card_inserted,
|
||||||
(bool (*)(void *))sdc_lld_is_write_protected,
|
(bool (*)(void *))sdc_lld_is_write_protected,
|
||||||
(bool (*)(void *))sdcConnect,
|
(bool (*)(void *))sdcConnect,
|
||||||
|
|
Loading…
Reference in New Issue