mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 18:39:50 +00:00
[nrf528xx] improve flash API (#3602)
This commit is contained in:
committed by
Jonathan Hui
parent
cb8761b7d0
commit
968f9b6898
@@ -51,7 +51,7 @@ bool nrf5FlashIsBusy(void)
|
||||
return NRF_NVMC->READY != NVMC_READY_READY_Ready;
|
||||
}
|
||||
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize)
|
||||
{
|
||||
nrf_nvmc_write_bytes(aAddress, aData, aSize);
|
||||
return aSize;
|
||||
|
||||
@@ -170,7 +170,7 @@ bool nrf5FlashIsBusy(void);
|
||||
* Function for writing data into flash.
|
||||
*
|
||||
*/
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize);
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize);
|
||||
|
||||
/**
|
||||
* Initialization of temperature controller.
|
||||
|
||||
@@ -51,7 +51,7 @@ bool nrf5FlashIsBusy(void)
|
||||
return NRF_NVMC->READY != NVMC_READY_READY_Ready;
|
||||
}
|
||||
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize)
|
||||
{
|
||||
nrf_nvmc_write_bytes(aAddress, aData, aSize);
|
||||
return aSize;
|
||||
|
||||
@@ -78,7 +78,7 @@ void nrf5SdSocFlashProcess(uint32_t aEvtId)
|
||||
}
|
||||
}
|
||||
|
||||
static otError sdFlashSingleWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
|
||||
static otError sdFlashSingleWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize)
|
||||
{
|
||||
uint32_t retval;
|
||||
uint32_t startTime = otPlatAlarmMilliGetNow();
|
||||
@@ -149,7 +149,7 @@ bool nrf5FlashIsBusy(void)
|
||||
return sFlashStatus != FLASH_STATUS_IDLE;
|
||||
}
|
||||
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize)
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
uint32_t result = 0;
|
||||
|
||||
@@ -188,7 +188,7 @@ bool nrf5FlashIsBusy(void);
|
||||
* Function for writing data into flash.
|
||||
*
|
||||
*/
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, uint8_t *aData, uint32_t aSize);
|
||||
uint32_t nrf5FlashWrite(uint32_t aAddress, const uint8_t *aData, uint32_t aSize);
|
||||
|
||||
/**
|
||||
* Initialization of temperature controller.
|
||||
|
||||
Reference in New Issue
Block a user