From 4bb818cd97f7433c4fed4fef71a34b5af92dccfe Mon Sep 17 00:00:00 2001 From: kl-cruz Date: Mon, 8 May 2017 09:10:16 +0200 Subject: [PATCH] nRF52840: Fixed flashapi test and casting issue --- TESTS/mbed_hal/flash/functional_tests/main.cpp | 1 - targets/TARGET_NORDIC/TARGET_NRF5_SDK13/flash_api.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/TESTS/mbed_hal/flash/functional_tests/main.cpp b/TESTS/mbed_hal/flash/functional_tests/main.cpp index d9b4b0121c..d2bf288467 100644 --- a/TESTS/mbed_hal/flash/functional_tests/main.cpp +++ b/TESTS/mbed_hal/flash/functional_tests/main.cpp @@ -24,7 +24,6 @@ #include "mbed.h" #include "flash_api.h" -#include "flash_data.h" using namespace utest::v1; diff --git a/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/flash_api.c b/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/flash_api.c index a0e32af8b3..8329a2c9be 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/flash_api.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5_SDK13/flash_api.c @@ -79,7 +79,7 @@ int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data, /* We will use *_words function to speed up flashing code. Word means 32bit -> 4B * or sizeof(uint32_t). */ - nrf_nvmc_write_words(address, data, (size / sizeof(uint32_t))); + nrf_nvmc_write_words(address, (const uint32_t *) data, (size / sizeof(uint32_t))); return 0; }