Skip to content

Commit

Permalink
[nrf noup] nrfconnect/telink: Adapt to zcbor 0.8.1
Browse files Browse the repository at this point in the history
New parameter to ZCBOR_STATE_D()

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
  • Loading branch information
oyvindronningstad authored and jfischer-no committed Feb 20, 2024
1 parent c36fcaf commit a4d48b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/platform/nrfconnect/FactoryDataParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bool FindUserDataEntry(struct FactoryData * factoryData, const char * entry, voi
return false;
}

ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL - 1, factoryData->user.data, factoryData->user.len, 1);
ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL - 1, factoryData->user.data, factoryData->user.len, 1, 0);

bool res = zcbor_map_start_decode(states);
bool keyFound = false;
Expand Down Expand Up @@ -130,7 +130,7 @@ bool ParseFactoryData(uint8_t * buffer, uint16_t bufferSize, struct FactoryData
}

memset(factoryData, 0, sizeof(*factoryData));
ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL, buffer, bufferSize, 1);
ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL, buffer, bufferSize, 1, 0);

bool res = zcbor_map_start_decode(states);
struct zcbor_string currentString;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/telink/FactoryDataParser.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static inline bool uint16_decode(zcbor_state_t * states, uint16_t * value)
bool ParseFactoryData(uint8_t * buffer, uint16_t bufferSize, struct FactoryData * factoryData)
{
memset(factoryData, 0, sizeof(*factoryData));
ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL, buffer, bufferSize, 1);
ZCBOR_STATE_D(states, MAX_FACTORY_DATA_NESTING_LEVEL, buffer, bufferSize, 1, 0);

bool res = zcbor_map_start_decode(states);
struct zcbor_string currentString;
Expand Down

0 comments on commit a4d48b7

Please sign in to comment.