aboutsummaryrefslogtreecommitdiff
path: root/stm-keystore.h
diff options
context:
space:
mode:
Diffstat (limited to 'stm-keystore.h')
-rw-r--r--stm-keystore.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/stm-keystore.h b/stm-keystore.h
index 9120340..2c493d2 100644
--- a/stm-keystore.h
+++ b/stm-keystore.h
@@ -38,6 +38,9 @@
#include "stm32f4xx_hal.h"
#include "spiflash_n25q128.h"
+#define KEYSTORE_PAGE_SIZE N25Q128_PAGE_SIZE
+#define KEYSTORE_SECTOR_SIZE N25Q128_SECTOR_SIZE
+
/* Pins connected to the FPGA config memory (SPI flash) */
#define KSM_PROM_CS_N_Pin GPIO_PIN_0
#define KSM_PROM_CS_N_GPIO_Port GPIOB
@@ -51,6 +54,7 @@
extern SPI_HandleTypeDef hspi_keystore;
extern int keystore_check_id(void);
+extern int keystore_read_data(uint32_t offset, uint8_t *buf, const uint32_t len);
extern int keystore_write_data(uint32_t offset, const uint8_t *buf, const uint32_t len);
extern int keystore_erase_sectors(int num);