![]() |
nrfxlib API 3.3.99
|
| bool nrf_802154_bsmap_rec_write | ( | nrf_802154_bsmap_t * | p_bsmap, |
| const void * | p_key, | ||
| const void * | p_value, | ||
| void * | p_aux_memory ) |
Write a record associated with a key into the BSMAP.
If the key is not found in the BSMAP, a new entry is inserted into the BSMAP with provided key and value. If the key is found in the BSMAP, the value associated with the key is updated with the provided value.
This function is optimized for low priority execution. It is thread-safe with respect to high priority lookups performed by the nrf_802154_bsmap_rec_get function. This function is not thread-safe with respect to itself or nrf_802154_bsmap_rec_delete.
| [in] | p_bsmap | Pointer to the BSMAP object to write to. |
| [in] | p_key | Pointer to the key to write. Must not be NULL. |
| [in] | p_value | Pointer to the value to write. If the BSMAP is initialized with value_size equal to 0, this parameter is ignored and can be NULL. Otherwise this parameter must not be NULL and must point to a storage containing value_size bytes as passed to the nrf_802154_bsmap_init function. |
| [in] | p_aux_memory | Pointer to an auxiliary memory storage used during modification. It must be able to store NRF_802154_BSMAP_AUX_MEMORY_SIZE bytes. |
| true | If the record was successfully written to the BSMAP. |
| false | If the record was not written to the BSMAP because BSMAP is full. |