summaryrefslogtreecommitdiff
path: root/include/nvcounter.h
blob: c523d6bd2dedcba5d0ac12eb037f721f73578a7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Copyright 2017 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef __EC_INCLUDE_NVCOUNTER_H
#define __EC_INCLUDE_NVCOUNTER_H

/*
 * CONFIG_FLASH_NVCOUNTER provides a robust, non-volatile incrementing counter.
 *
 * It is currently uses 2 physical pages of flash for its underlying storage
 * which are configured by CONFIG_FLASH_NVCTR_BASE_A and
 * CONFIG_FLASH_NVCTR_BASE_B in board.h
 */

/* return the value of the counter after incrementing it */
uint32_t nvcounter_incr(void);

#endif	/* __EC_INCLUDE_NVCOUNTER_H */