make flash library more general purpose and optimize it
This commit is contained in:
parent
d7220e1106
commit
8664b96055
|
@ -15,20 +15,11 @@
|
|||
/** library to read/write internal flash (API)
|
||||
* @file flash_internal.h
|
||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||
* @date 2016
|
||||
* @date 2016-2017
|
||||
* @note peripherals used: none
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <libopencm3/stm32/desig.h> // device signature utilities
|
||||
|
||||
/** how much data (in bytes) should we be able to store (be sure it's available and does not overlap the firmware) */
|
||||
#define STORAGE_SIZE 2048
|
||||
/** the end of the flash area where to store data */
|
||||
#define STORAGE_END FLASH_BASE+DESIG_FLASH_SIZE
|
||||
/** the start of the flash area where to store data (be sure it's after the firmware data) */
|
||||
#define STORAGE_START STORAGE_END-STORAGE_SIZE
|
||||
|
||||
/** read data from internal flash
|
||||
* @param[in] address start address of the data to read
|
||||
* @param[out] buffer where to store the read data
|
||||
|
|
Loading…
Reference in New Issue