From f89581412a224d6475467c719ae385b1f700f413 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 26 Feb 2018 12:58:27 +0000 Subject: BaseFlash now extends BaseObject. git-svn-id: https://svn.code.sf.net/p/chibios/svn2/trunk@11548 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/ex/Micron/m25q.c | 1 + os/hal/lib/peripherals/flash/hal_flash.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/os/ex/Micron/m25q.c b/os/ex/Micron/m25q.c index f0a894cf7..af9d0016b 100644 --- a/os/ex/Micron/m25q.c +++ b/os/ex/Micron/m25q.c @@ -71,6 +71,7 @@ static flash_error_t m25q_read_sfdp(void *instance, flash_offset_t offset, * @brief Virtual methods table. */ static const struct M25QDriverVMT m25q_vmt = { + (size_t)0, m25q_get_descriptor, m25q_read, m25q_program, m25q_start_erase_all, m25q_start_erase_sector, m25q_query_erase, m25q_verify_erase, diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h index e2421b5df..b540b831d 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.h +++ b/os/hal/lib/peripherals/flash/hal_flash.h @@ -162,6 +162,7 @@ typedef struct { * @brief @p BaseFlash specific methods with inherited ones. */ #define _base_flash_methods \ + _base_object_methods \ _base_flash_methods_alone /** @@ -175,10 +176,13 @@ struct BaseFlashVMT { * @brief @p BaseFlash specific data. */ #define _base_flash_data \ + _base_object_data \ /* Driver state.*/ \ flash_state_t state; /** + * @extends BaseObject + * * @brief Base flash class. */ typedef struct { -- cgit v1.2.3