Pico flash size bytes (#159)
* Move PICO_FLASH_SIZE_BYTES out of platform_defs.h since it precedes board config; also default to -1 for unknown * make default for PICO_FLASH_SIZE_BYTES undefined - i.e. no value
This commit is contained in:
parent
0d789c9b54
commit
743dbabdec
@ -46,9 +46,5 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef PICO_FLASH_SIZE_BYTES
|
||||
#define PICO_FLASH_SIZE_BYTES (2 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -9,17 +9,6 @@
|
||||
|
||||
#include "pico.h"
|
||||
|
||||
// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_FLASH, Enable/disable assertions in the flash module, type=bool, default=0, group=hardware_flash
|
||||
#ifndef PARAM_ASSERTIONS_ENABLED_FLASH
|
||||
#define PARAM_ASSERTIONS_ENABLED_FLASH 0
|
||||
#endif
|
||||
|
||||
#define FLASH_PAGE_SIZE (1u << 8)
|
||||
#define FLASH_SECTOR_SIZE (1u << 12)
|
||||
#define FLASH_BLOCK_SIZE (1u << 16)
|
||||
|
||||
#define FLASH_UNIQUE_ID_SIZE_BYTES 8
|
||||
|
||||
/** \file flash.h
|
||||
* \defgroup hardware_flash hardware_flash
|
||||
*
|
||||
@ -44,6 +33,22 @@
|
||||
* \include flash_program.c
|
||||
*/
|
||||
|
||||
// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_FLASH, Enable/disable assertions in the flash module, type=bool, default=0, group=hardware_flash
|
||||
#ifndef PARAM_ASSERTIONS_ENABLED_FLASH
|
||||
#define PARAM_ASSERTIONS_ENABLED_FLASH 0
|
||||
#endif
|
||||
|
||||
#define FLASH_PAGE_SIZE (1u << 8)
|
||||
#define FLASH_SECTOR_SIZE (1u << 12)
|
||||
#define FLASH_BLOCK_SIZE (1u << 16)
|
||||
|
||||
#define FLASH_UNIQUE_ID_SIZE_BYTES 8
|
||||
|
||||
// PICO_CONFIG: PICO_FLASH_SIZE_BYTES, size of primary flash in bytes, type=int, default=-1, group=hardware_flash
|
||||
#ifndef PICO_FLASH_SIZE_BYTES
|
||||
#warning PICO_FLASH_SIZE_BYTES is not set
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user