diff options
Diffstat (limited to 'test/test_config.h')
-rw-r--r-- | test/test_config.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/test_config.h b/test/test_config.h index d7e4b7b172..5b21c8f61c 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -149,6 +149,33 @@ int ncp15wb_calculate_temp(uint16_t adc); #define CONFIG_USB_PD_PORT_COUNT 2 #endif +#ifdef TEST_NVMEM +#define CONFIG_FLASH_NVMEM +#define CONFIG_FLASH_NVMEM_OFFSET 0x1000 +#define CONFIG_FLASH_NVMEM_BASE (CONFIG_PROGRAM_MEMORY_BASE + \ + CONFIG_FLASH_NVMEM_OFFSET) +#define CONFIG_FLASH_NVMEM_SIZE 0x4000 +#define CONFIG_SW_CRC + +#define NVMEM_PARTITION_SIZE \ + (CONFIG_FLASH_NVMEM_SIZE / NVMEM_NUM_PARTITIONS) +/* User buffer definitions for test purposes */ +#define NVMEM_USER_2_SIZE 0x201 +#define NVMEM_USER_1_SIZE 0x402 +#define NVMEM_USER_0_SIZE (NVMEM_PARTITION_SIZE - \ + NVMEM_USER_2_SIZE - NVMEM_USER_1_SIZE - \ + sizeof(struct nvmem_tag)) + +#ifndef __ASSEMBLER__ +enum nvmem_users { + NVMEM_USER_0, + NVMEM_USER_1, + NVMEM_USER_2, + NVMEM_NUM_USERS +}; +#endif +#endif + #ifndef __ASSEMBLER__ /* Callback function from charge_manager to send host event */ static inline void pd_send_host_event(int mask) { } |