1 /* -------------------------------- Arctic Core ------------------------------
\r
2 * Arctic Core - the open source AUTOSAR platform http://arccore.com
\r
4 * Copyright (C) 2009 ArcCore AB <contact@arccore.com>
\r
6 * This source code is free software; you can redistribute it and/or modify it
\r
7 * under the terms of the GNU General Public License version 2 as published by the
\r
8 * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
\r
10 * This program is distributed in the hope that it will be useful, but
\r
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
\r
14 * -------------------------------- Arctic Core ------------------------------*/
\r
18 #if defined(CFG_NVM_USE_SERVICE_COMPONENT)
\r
20 Std_ReturnType NvMService_GetErrorStatus(NvM_BlockIdType BlockId, NvM_RequestResultType* RequestResultPtr) {
\r
21 NvM_GetErrorStatus( BlockId, (uint8*)RequestResultPtr );
\r
25 #if (NVM_SET_RAM_BLOCK_STATUS_API == STD_ON )
\r
26 Std_ReturnType NvMService_SetRamBlockStatus(NvM_BlockIdType BlockId, Boolean BlockChanged) {
\r
27 NvM_SetRamBlockStatus( BlockId, (boolean)BlockChanged );
\r
32 #if (NVM_API_CONFIG_CLASS > NVM_API_CONFIG_CLASS_1)
\r
34 Std_ReturnType NvMService_SetDataIndex(NvM_BlockIdType BlockId, UInt8 DataIndex) {
\r
35 NvM_SetDataIndex( BlockId, (uint8)DataIndex );
\r
39 Std_ReturnType NvMService_GetDataIndex(NvM_BlockIdType BlockId, UInt8* DataIndexPtr) {
\r
40 NvM_GetDataIndex( BlockId, (uint8*)DataIndexPtr );
\r
44 Std_ReturnType NvMService_ReadBlock(NvM_BlockIdType BlockId, const DstPtrType DstPtr) {
\r
45 return NvM_ReadBlock(BlockId, (uint8*)DstPtr), E_OK;
\r
48 Std_ReturnType NvMService_WriteBlock(NvM_BlockIdType BlockId, const DstPtrType SrcPtr) {
\r
49 return NvM_WriteBlock( BlockId, (uint8*)(SrcPtr) ), E_OK;
\r
52 Std_ReturnType NvMService_RestoreBlockDefaults(NvM_BlockIdType BlockId, const DstPtrType DstPtr) {
\r
53 return NvM_RestoreBlockDefaults( BlockId, (uint8*)DstPtr ), E_OK;
\r
58 Std_ReturnType NvMService_SetDataIndex(NvM_BlockIdType BlockId, UInt8 DataIndex) {
\r
63 Std_ReturnType NvMService_GetDataIndex(NvM_BlockIdType BlockId, UInt8* DataIndexPtr) {
\r
68 Std_ReturnType NvMService_ReadBlock(NvM_BlockIdType BlockId, const DstPtrType DstPtr) {
\r
73 Std_ReturnType NvMService_WriteBlock(NvM_BlockIdType BlockId, const DstPtrType SrcPtr) {
\r
75 return NvM_WriteBlock(BlockId, (const uint8*) SrcPtr);
\r
78 Std_ReturnType NvMService_RestoreBlockDefaults(NvM_BlockIdType BlockId, const DstPtrType DstPtr) {
\r
85 #if (NVM_API_CONFIG_CLASS > NVM_API_CONFIG_CLASS_2)
\r
87 Std_ReturnType NvMService_EraseBlock(NvM_BlockIdType BlockId) {
\r
88 return NvM_EraseNvBlock( BlockId );
\r
91 Std_ReturnType NvMService_InvalidateNvBlock(NvM_BlockIdType BlockId) {
\r
92 return NvM_InvalidateNvBlock( BlockId );
\r
95 Std_ReturnType NvMAdmin_SetBlockProtection(NvM_BlockIdType BlockId, Boolean ProtectionEnabled) {
\r
96 NvM_SetBlockProtection( BlockId, (boolean)(ProtectionEnabled) );
\r
102 Std_ReturnType NvMService_EraseBlock(NvM_BlockIdType BlockId) {
\r
107 Std_ReturnType NvMService_InvalidateNvBlock(NvM_BlockIdType BlockId) {
\r
112 Std_ReturnType NvMAdmin_SetBlockProtection(NvM_BlockIdType BlockId, Boolean ProtectionEnabled) {
\r
119 #endif /* CFG_NVM_USE_SERVICE_COMPONENT */
\r