Skip to content
Permalink
Browse files

drivers/flash/flash_simulator: switch to use DT_FLASH_SIM labels

It Need to start using DT_FLASH_SIM_xxx labels after sim_flash was
un-chosen as zephyr,flash.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
  • Loading branch information...
nvlsianpu authored and andrewboie committed Jul 4, 2019
1 parent 5a3f106 commit 891ccdc1826b4cacc23345e2bcd3b2a0657bf0ad
Showing with 8 additions and 8 deletions.
  1. +4 −4 drivers/flash/flash_simulator.c
  2. +4 −4 tests/drivers/flash_simulator/src/main.c
@@ -14,10 +14,10 @@
#include <string.h>

/* configuration derived from DT */
#define FLASH_SIMULATOR_BASE_OFFSET DT_FLASH_BASE_ADDRESS
#define FLASH_SIMULATOR_ERASE_UNIT DT_FLASH_ERASE_BLOCK_SIZE
#define FLASH_SIMULATOR_PROG_UNIT DT_FLASH_WRITE_BLOCK_SIZE
#define FLASH_SIMULATOR_FLASH_SIZE DT_FLASH_SIZE
#define FLASH_SIMULATOR_BASE_OFFSET DT_FLASH_SIM_BASE_ADDRESS
#define FLASH_SIMULATOR_ERASE_UNIT DT_FLASH_SIM_ERASE_BLOCK_SIZE
#define FLASH_SIMULATOR_PROG_UNIT DT_FLASH_SIM_WRITE_BLOCK_SIZE
#define FLASH_SIMULATOR_FLASH_SIZE (DT_FLASH_SIM_SIZE / 1024)

#if (FLASH_SIMULATOR_ERASE_UNIT % FLASH_SIMULATOR_PROG_UNIT)
#error "Erase unit must be a multiple of program unit"
@@ -9,10 +9,10 @@
#include <device.h>

/* configuration derived from DT */
#define FLASH_SIMULATOR_BASE_OFFSET DT_FLASH_BASE_ADDRESS
#define FLASH_SIMULATOR_ERASE_UNIT DT_FLASH_ERASE_BLOCK_SIZE
#define FLASH_SIMULATOR_PROG_UNIT DT_FLASH_WRITE_BLOCK_SIZE
#define FLASH_SIMULATOR_FLASH_SIZE DT_FLASH_SIZE
#define FLASH_SIMULATOR_BASE_OFFSET DT_FLASH_SIM_BASE_ADDRESS
#define FLASH_SIMULATOR_ERASE_UNIT DT_FLASH_SIM_ERASE_BLOCK_SIZE
#define FLASH_SIMULATOR_PROG_UNIT DT_FLASH_SIM_WRITE_BLOCK_SIZE
#define FLASH_SIMULATOR_FLASH_SIZE (DT_FLASH_SIM_SIZE / 1024)

/* Offset between pages */
#define TEST_SIM_FLASH_SIZE (FLASH_SIMULATOR_ERASE_UNIT *\

0 comments on commit 891ccdc

Please sign in to comment.
You can’t perform that action at this time.