MT2523 API Reference  LinkIt SDK v4
nvdm.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __NVDM_H__
36 #define __NVDM_H__
37 
38 #ifdef MTK_NVDM_ENABLE
39 
101 #include <stdint.h>
102 
103 #ifdef __cplusplus
104 extern "C" {
105 #endif
106 
112 typedef enum {
116 
118 typedef enum {
125 } nvdm_status_t;
126 
140 
159 nvdm_status_t nvdm_write_data_item(const char *group_name,
160  const char *data_item_name,
162  const uint8_t *buffer,
163  uint32_t size);
164 
181 nvdm_status_t nvdm_read_data_item(const char *group_name,
182  const char *data_item_name,
183  uint8_t *buffer,
184  uint32_t *size);
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
194 #endif
195 
196 #endif /* __NVDM_H__ */
197 
An unknown error occurred.
Definition: nvdm.h:123
The operation was successful.
Definition: nvdm.h:124
No space is available in the flash.
Definition: nvdm.h:121
The user parameter is invalid.
Definition: nvdm.h:119
nvdm_status_t nvdm_read_data_item(const char *group_name, const char *data_item_name, uint8_t *buffer, uint32_t *size)
This function is used to read the data item from flash.
The NVDM found a checksum error when reading the data item.
Definition: nvdm.h:122
nvdm_status_t nvdm_init(void)
This function initializes the NVDM module to enable the NVDM services.
The data item wasn&#39;t found by the NVDM.
Definition: nvdm.h:120
nvdm_status_t nvdm_write_data_item(const char *group_name, const char *data_item_name, nvdm_data_item_type_t type, const uint8_t *buffer, uint32_t size)
This function is used to write or update a data item to flash.
Defines the display type with string.
Definition: nvdm.h:114
Defines the display type with raw data.
Definition: nvdm.h:113
nvdm_data_item_type_t
This enum defines the display type of a data item.
Definition: nvdm.h:112
nvdm_status_t
This enum defines return type of NVDM APIs.
Definition: nvdm.h:118