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:
Giovanni Di Sirio 2018-02-26 13:05:55 +00:00
parent f89581412a
commit e8dda5f8ee
3 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,7 @@ typedef struct {
* @brief @p BaseBlockDevice specific methods.
*/
#define _base_block_device_methods \
_base_object_methods \
/* Removable media detection.*/ \
bool (*is_inserted)(void *instance); \
/* Removable write protection detection.*/ \
@ -84,6 +85,7 @@ typedef struct {
* @brief @p BaseBlockDevice specific data.
*/
#define _base_block_device_data \
_base_object_data \
/* Driver state.*/ \
blkstate_t state;
@ -95,6 +97,8 @@ struct BaseBlockDeviceVMT {
};
/**
* @extends BaseObject
*
* @brief Base block device class.
* @details This class represents a generic, block-accessible, device.
*/

View File

@ -53,6 +53,7 @@ static bool mmc_write(void *instance, uint32_t startblk,
* @brief Virtual methods table.
*/
static const struct MMCDriverVMT mmc_vmt = {
(size_t)0,
(bool (*)(void *))mmc_lld_is_card_inserted,
(bool (*)(void *))mmc_lld_is_write_protected,
(bool (*)(void *))mmcConnect,

View File

@ -72,6 +72,7 @@ typedef enum {
* @brief Virtual methods table.
*/
static const struct SDCDriverVMT sdc_vmt = {
(size_t)0,
(bool (*)(void *))sdc_lld_is_card_inserted,
(bool (*)(void *))sdc_lld_is_write_protected,
(bool (*)(void *))sdcConnect,