4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
\r
6 * Contact: Paresh Agarwal<paresh.agwl@samsung.com>
\r
8 * Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * you may not use this file except in compliance with the License.
\r
10 * You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing, software
\r
15 * distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * See the License for the specific language governing permissions and
\r
18 * limitations under the License.
\r
24 /* Priority level for suspension of all updates */
\r
25 #define UTA_FLASH_PLUGIN_PRIO_SUSPEND_ALL 4294967295 /* 0xFFFFFFFF */
\r
27 /* Priority level for suspension of High priority updates */
\r
28 #define UTA_FLASH_PLUGIN_PRIO_SUSPEND_HIGH 3221225472 /* 0xFFFFFFFF */
\r
30 /* Priority level for suspension of all updates of dynamic data */
\r
31 #define UTA_FLASH_PLUGIN_PRIO_SUSPEND_ALL_DYN 1610612735 /* 0x5FFFFFFF */
\r
33 /* Priority level for suspension of Medium all updates */
\r
34 #define UTA_FLASH_PLUGIN_PRIO_SUSPEND_MEDIUM 2147483648 /* 0x5FFFFFFF */
\r
36 /* Priority level for suspension of Low updates of Medium */
\r
37 #define UTA_FLASH_PLUGIN_PRIO_SUSPEND_LOW 1073741824 /* 0x5FFFFFFF */
\r
39 /* Priority level for unsuspension of all updates */
\r
40 #define UTA_FLASH_PLUGIN_PRIO_UNSUSPEND_ALL 0 /* 0x0 */
\r
42 #define NVM_FUNCTION_ID_OFFSET 20
\r
43 #define XDRV_INDICATION 0x04
\r
45 #define XDRV_DISABLE "0"
\r
46 #define XDRV_ENABLE "1"
\r
47 #define XDRV_UNSUSPEND "0"
\r
49 /* Identifies our group with the xdrv AT command set */
\r
50 #define IUFP_GROUP "43"
\r
51 #define IUFP_GROUP_ID 43
\r
53 #define IUFP_REGISTER 0
\r
54 #define IUFP_REGISTER_STR "0"
\r
56 #define IUFP_SUSPEND 1
\r
57 #define IUFP_SUSPEND_STR "1"
\r
59 #define IUFP_FLUSH 2
\r
60 #define IUFP_FLUSH_STR "2"
\r
62 #define IUFP_UPDATE_REQ 3
\r
63 #define IUFP_UPDATE_REQ_STR "3"
\r
65 #define IUFP_UPDATE_REQ_ACK 3
\r
66 #define IUFP_UPDATE_REQ_ACK_STR "3"
\r
68 #define IUFP_UPDATE 4
\r
69 #define IUFP_UPDATE_STR "4"
\r
71 #define IUFP_UPDATE_ACK 4
\r
72 #define IUFP_UPDATE_ACK_STR "4"
\r
74 #define IUFP_NO_PENDING_UPDATE 5
\r
75 #define IUFP_NO_PENDING_UPDATE_STR "5"
\r
77 /* XDRV command was executed without any error */
\r
78 #define XDRV_RESULT_OK 0
\r
80 typedef enum uta_common_return_codes {
\r
83 UTA_ERROR_OUT_OF_MEMORY = -2,
\r
84 UTA_ERROR_INVALID_HANDLE = -3,
\r
85 UTA_ERROR_OUT_OF_RANGE_PARAM = -4,
\r
86 UTA_ERROR_INVALID_PARAM = -5,
\r
87 UTA_ERROR_TOO_SMALL_BUF_PARAM = -6,
\r
88 UTA_ERROR_NOT_SUPPORTED = -7,
\r
89 UTA_ERROR_TIMEOUT = -8,
\r
90 UTA_ERROR_WRONG_STATE = -9,
\r
91 UTA_ERROR_BAD_FORMAT = -10,
\r
92 UTA_ERROR_INSUFFICIENT_PERMISSIONS = -11,
\r
93 UTA_ERROR_IO_ERROR = -12,
\r
94 UTA_ERROR_OUT_OF_HANDLES = -13,
\r
95 UTA_ERROR_OPERATION_PENDING = -14,
\r
96 UTA_ERROR_SPECIFIC = -100
\r
99 typedef enum nvm_error_numbers {
\r
115 NVM_NO_PENDING_UPDATE,
\r
121 int nvm_sum_4_bytes(const char *pos);
\r
122 gboolean nvm_create_nvm_data();
\r
123 nvm_error nvm_process_nv_update(const char *data);
\r
125 #endif /* __NVM_H__ */
\r