summaryrefslogtreecommitdiff
path: root/include/otp.h
blob: 7851411202059aa8ed06b9d1064d0ce177fa7aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* 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.
 */

/* OTP memory module for Chrome EC */

#ifndef __CROS_EC_OTP_H
#define __CROS_EC_OTP_H

/*
 * OTP: One Time Programable memory is used for storing persistent data.
 */

/**
 * Set the serial number in OTP memory.
 *
 * @param serialno	ascii serial number string.
 *
 * @return success status.
 */
int otp_write_serial(const char *serialno);

/**
 * Get the serial number from flash.
 *
 * @return char * ascii serial number string.
 *     NULL if error.
 */
const char *otp_read_serial(void);

#endif  /* __CROS_EC_OTP_H */