mirror of
https://github.com/espressif/openthread.git
synced 2026-09-14 13:10:08 +00:00
[style] relocate OT_UNUSED_VARIABLE (#3299)
This commit is contained in:
@@ -128,14 +128,14 @@ static void initSettings(uint32_t aBase, uint32_t aFlag)
|
||||
|
||||
static uint32_t swapSettingsBlock(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
uint32_t oldBase = sSettingsBaseAddress;
|
||||
uint32_t swapAddress = oldBase;
|
||||
uint32_t usedSize = sSettingsUsedSize;
|
||||
uint8_t pageNum = SETTINGS_CONFIG_PAGE_NUM;
|
||||
uint32_t settingsSize = pageNum > 1 ? SETTINGS_CONFIG_PAGE_SIZE * pageNum / 2 : SETTINGS_CONFIG_PAGE_SIZE;
|
||||
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
otEXPECT(pageNum > 1);
|
||||
|
||||
sSettingsBaseAddress =
|
||||
@@ -257,12 +257,12 @@ exit:
|
||||
// settings API
|
||||
void otPlatSettingsInit(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
uint8_t index;
|
||||
uint32_t settingsSize = SETTINGS_CONFIG_PAGE_NUM > 1 ? SETTINGS_CONFIG_PAGE_SIZE * SETTINGS_CONFIG_PAGE_NUM / 2
|
||||
: SETTINGS_CONFIG_PAGE_SIZE;
|
||||
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
sSettingsBaseAddress = SETTINGS_CONFIG_BASE_ADDRESS;
|
||||
|
||||
utilsFlashInit();
|
||||
@@ -307,30 +307,33 @@ void otPlatSettingsInit(otInstance *aInstance)
|
||||
otError otPlatSettingsBeginChange(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatSettingsCommitChange(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatSettingsAbandonChange(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatSettingsGet(otInstance *aInstance, uint16_t aKey, int aIndex, uint8_t *aValue, uint16_t *aValueLength)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
otError error = OT_ERROR_NOT_FOUND;
|
||||
uint32_t address = sSettingsBaseAddress + OT_SETTINGS_FLAG_SIZE;
|
||||
uint16_t valueLength = 0;
|
||||
int index = 0;
|
||||
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
while (address < (sSettingsBaseAddress + sSettingsUsedSize))
|
||||
{
|
||||
struct settingsBlock block;
|
||||
@@ -397,12 +400,12 @@ otError otPlatSettingsAdd(otInstance *aInstance, uint16_t aKey, const uint8_t *a
|
||||
|
||||
otError otPlatSettingsDelete(otInstance *aInstance, uint16_t aKey, int aIndex)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
otError error = OT_ERROR_NOT_FOUND;
|
||||
uint32_t address = sSettingsBaseAddress + OT_SETTINGS_FLAG_SIZE;
|
||||
int index = 0;
|
||||
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
while (address < (sSettingsBaseAddress + sSettingsUsedSize))
|
||||
{
|
||||
struct settingsBlock block;
|
||||
|
||||
Reference in New Issue
Block a user