TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ps_nv_counters.c File Reference
#include "ps_nv_counters.h"
#include "tfm_platform_api.h"
Include dependency graph for ps_nv_counters.c:

Go to the source code of this file.

Functions

psa_status_t ps_read_nv_counter (enum tfm_nv_counter_t counter_id, uint32_t *val)
 Reads the given non-volatile (NV) counter. More...
 
psa_status_t ps_increment_nv_counter (enum tfm_nv_counter_t counter_id)
 Increments the given non-volatile (NV) counter. More...
 

Function Documentation

psa_status_t ps_increment_nv_counter ( enum tfm_nv_counter_t  counter_id)

Increments the given non-volatile (NV) counter.

Parameters
[in]counter_idNV counter ID.
Returns
If the counter is incremented correctly, it returns PSA_SUCCESS. Otherwise, PSA_ERROR_GENERIC_ERROR.

Definition at line 25 of file ps_nv_counters.c.

psa_status_t ps_read_nv_counter ( enum tfm_nv_counter_t  counter_id,
uint32_t *  val 
)

Reads the given non-volatile (NV) counter.

Parameters
[in]counter_idNV counter ID.
[out]valPointer to store the current NV counter value.
Returns
PSA_SUCCESS if the value is read correctly, otherwise PSA_ERROR_GENERIC_ERROR

Definition at line 11 of file ps_nv_counters.c.