aboutsummaryrefslogtreecommitdiff
path: root/spiflash_n25q128.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-15 21:34:00 -0400
commit5af4a915edf3e77705fa2625081200b61f8dda26 (patch)
tree46d8e3cc6e27627e9f3e78c5a0b4a3573d1b1de3 /spiflash_n25q128.h
parentb159bf0bb24a99c7d3ff1b3855f840add63198e5 (diff)
Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
Diffstat (limited to 'spiflash_n25q128.h')
-rw-r--r--spiflash_n25q128.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/spiflash_n25q128.h b/spiflash_n25q128.h
index 50243bd..926be56 100644
--- a/spiflash_n25q128.h
+++ b/spiflash_n25q128.h
@@ -70,13 +70,13 @@ struct spiflash_ctx {
uint16_t cs_n_pin;
};
-extern int n25q128_check_id(struct spiflash_ctx *ctx);
-extern int n25q128_read_data(struct spiflash_ctx *ctx, uint32_t offset, uint8_t *buf, const uint32_t len);
-extern int n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_offset, const uint8_t *page_buffer);
-extern int n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t *buf, const uint32_t len);
-extern int n25q128_erase_subsector(struct spiflash_ctx *ctx, uint32_t subsector_offset);
-extern int n25q128_erase_sector(struct spiflash_ctx *ctx, uint32_t sector_offset);
-extern int n25q128_erase_bulk(struct spiflash_ctx *ctx);
+extern HAL_StatusTypeDef n25q128_check_id(struct spiflash_ctx *ctx);
+extern HAL_StatusTypeDef n25q128_read_data(struct spiflash_ctx *ctx, uint32_t offset, uint8_t *buf, const uint32_t len);
+extern HAL_StatusTypeDef n25q128_write_page(struct spiflash_ctx *ctx, uint32_t page_offset, const uint8_t *page_buffer);
+extern HAL_StatusTypeDef n25q128_write_data(struct spiflash_ctx *ctx, uint32_t offset, const uint8_t *buf, const uint32_t len);
+extern HAL_StatusTypeDef n25q128_erase_subsector(struct spiflash_ctx *ctx, uint32_t subsector_offset);
+extern HAL_StatusTypeDef n25q128_erase_sector(struct spiflash_ctx *ctx, uint32_t sector_offset);
+extern HAL_StatusTypeDef n25q128_erase_bulk(struct spiflash_ctx *ctx);
#define n25q128_read_page(ctx, page_offset, page_buffer) \
n25q128_read_data(ctx, page_offset * N25Q128_PAGE_SIZE, page_buffer, N25Q128_PAGE_SIZE)