This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to use fds_write() fds_read() SDK13

I try to implement this library to my code.

uint32_t settings_set_erase_flag(int32_t flag)
{
	uint32_t err_code = fds_write(flag, ERASE_BOND_FLAG);
	return err_code;
}

int32_t settings_get_erase_flag(void)
{
int32_t flag;
		uint32_t err_code = fds_read(&flag, ERASE_BOND_FLAG);
		if(err_code != FDS_SUCCESS)
			return 0x33;
		else
			return flag;
}

But when I want to read this value, I always get 0x33

How can I correct usage this library?

Related