diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-05-08 13:12:28 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-05-08 13:12:28 +0000 |
commit | ceb256ed74e5f8cb5bf32f8268b2bd70f8850c1b (patch) | |
tree | 6d5dba6fbbf96e2276e4735bc217e2ea9d92ce31 /os/hal/lib/peripherals/flash | |
parent | a4e52c4687af0945077aed7203be852fcdf8bd9b (diff) | |
download | ChibiOS-ceb256ed74e5f8cb5bf32f8268b2bd70f8850c1b.tar.gz ChibiOS-ceb256ed74e5f8cb5bf32f8268b2bd70f8850c1b.tar.bz2 ChibiOS-ceb256ed74e5f8cb5bf32f8268b2bd70f8850c1b.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9451 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/lib/peripherals/flash')
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_flash.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_flash.h b/os/hal/lib/peripherals/flash/hal_flash.h index c3559a732..b3c47b377 100644 --- a/os/hal/lib/peripherals/flash/hal_flash.h +++ b/os/hal/lib/peripherals/flash/hal_flash.h @@ -66,13 +66,11 @@ typedef enum { */
typedef enum {
FLASH_NO_ERROR = 0, /* No error. */
- FLASH_PARAMETER_ERROR = 1, /* Error in a function parameter. */
- FLASH_ADDRESS_ERROR = 2, /* Operation overlaps invalid addresses. */
- FLASH_ECC_ERROR = 3, /* ECC error during read operation. */
- FLASH_PROGRAM_FAILURE = 4, /* Program operation failed. */
- FLASH_ERASE_FAILURE = 5, /* Erase operation failed. */
- FLASH_VERIFY_FAILURE = 6, /* Verify operation failed. */
- FLASH_HW_FAILURE = 7 /* Controller or communication error. */
+ FLASH_ECC_ERROR = 1, /* ECC error during read operation. */
+ FLASH_PROGRAM_FAILURE = 2, /* Program operation failed. */
+ FLASH_ERASE_FAILURE = 3, /* Erase operation failed. */
+ FLASH_VERIFY_FAILURE = 4, /* Verify operation failed. */
+ FLASH_HW_FAILURE = 5 /* Controller or communication error. */
} flash_error_t;
/**
@@ -140,7 +138,7 @@ typedef struct { */
#define _base_flash_methods_alone \
/* Get flash device attributes.*/ \
- const flash_descriptor_t * (*get_attributes)(void *instance); \
+ const flash_descriptor_t * (*get_descriptor)(void *instance); \
/* Erase whole flash device.*/ \
flash_error_t (*erase_all)(void *instance); \
/* Erase single sector.*/ \
@@ -206,8 +204,8 @@ typedef struct { *
* @api
*/
-#define flashGetType(ip) \
- (ip)->vmt_baseflash->get_attributes(ip)
+#define flashGetDescriptor(ip) \
+ (ip)->vmt_baseflash->get_descriptor(ip)
/**
* @brief Whole device erase operation.
|