TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test_ps_nv_counters.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __TEST_PS_NV_COUNTERS_H__
9 #define __TEST_PS_NV_COUNTERS_H__
10 
11 #include <stdint.h>
12 #include "psa/protected_storage.h"
13 #include "tfm_plat_nv_counters.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
28 psa_status_t test_ps_read_nv_counter(enum tfm_nv_counter_t counter_id,
29  uint32_t *val);
30 
40 psa_status_t test_ps_increment_nv_counter(enum tfm_nv_counter_t counter_id);
41 
51 psa_status_t test_ps_decrement_nv_counter(enum tfm_nv_counter_t counter_id);
52 
59 
64 
75 psa_status_t test_ps_set_nv_counter(enum tfm_nv_counter_t counter_id,
76  uint32_t value);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* __TEST_PS_NV_COUNTERS_H__ */
psa_status_t test_ps_set_nv_counter(enum tfm_nv_counter_t counter_id, uint32_t value)
Sets a new value into the given non-volatile (NV) counter.
psa_status_t test_ps_increment_nv_counter(enum tfm_nv_counter_t counter_id)
Increments the given non-volatile (NV) counter.
psa_status_t test_ps_decrement_nv_counter(enum tfm_nv_counter_t counter_id)
Decrements the given non-volatile (NV) counter.
void test_ps_disable_increment_nv_counter(void)
Disables PS increment nv counter function to force PSA_ERROR_GENERIC_ERROR return value as an indicat...
psa_status_t test_ps_read_nv_counter(enum tfm_nv_counter_t counter_id, uint32_t *val)
Reads the given non-volatile (NV) counter.
void test_ps_enable_increment_nv_counter(void)
Enables PS increment nv counter function to work normally.
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:43