RUI3 (RAK Unified Interface 3) - RAK4631
Flash

Functions

bool get (uint32_t offset, uint8_t *buf, uint32_t len)
 
bool set (uint32_t offset, uint8_t *buf, uint32_t len)
 

Detailed Description

Function Documentation

◆ get()

bool get ( uint32_t  offset,
uint8_t *  buf,
uint32_t  len 
)
Description
Read a range of data from user flash partition.
Syntax
api.system.flash.get(offset, buf, len)
Parameters
offsetthe offset to the start of user flash partition (The sum of offset and length can't exceed 0x7800. If the chip is nRF52840(e.g. RAK4631), this limitation becomes 0x20000.)
bufthe buffer for reading the data
lenthe length of data (The sum of offset and length can't exceed 0x7800. If the chip is nRF52840(e.g. RAK4631), this limitation becomes 0x20000.)
Returns
bool
Return values
TRUEfor reading data successfully
FALSEfor reading data failure

◆ set()

bool set ( uint32_t  offset,
uint8_t *  buf,
uint32_t  len 
)
Description
Write a range of data from user flash partition.
Syntax
api.system.flash.set(offset, buf, len)
Parameters
offsetthe offset to the start of user flash partition (The sum of offset and length can't exceed 0x7800. If the chip is nRF52840(e.g. RAK4631), this limitation becomes 0x20000.)
bufthe buffer for writing the data
lenthe length of data (The sum of offset and length can't exceed 0x7800. If the chip is nRF52840(e.g. RAK4631), this limitation becomes 0x20000.)
Returns
bool
Return values
TRUEfor writing data successfully
FALSEfor writing data failure