Simple interface for Mbed Cloud Client

Dependents:  

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers arm_uc_pal_flashiap.c Source File

arm_uc_pal_flashiap.c

00001 // ----------------------------------------------------------------------------
00002 // Copyright 2016-2017 ARM Ltd.
00003 //
00004 // SPDX-License-Identifier: Apache-2.0
00005 //
00006 // Licensed under the Apache License, Version 2.0 (the "License");
00007 // you may not use this file except in compliance with the License.
00008 // You may obtain a copy of the License at
00009 //
00010 //     http://www.apache.org/licenses/LICENSE-2.0
00011 //
00012 // Unless required by applicable law or agreed to in writing, software
00013 // distributed under the License is distributed on an "AS IS" BASIS,
00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 // See the License for the specific language governing permissions and
00016 // limitations under the License.
00017 // ----------------------------------------------------------------------------
00018 
00019 #include "update-client-paal/arm_uc_paal_update_api.h"
00020 
00021 #include "update-client-pal-flashiap/arm_uc_pal_flashiap_implementation.h"
00022 
00023 ARM_UC_PAAL_UPDATE_CAPABILITIES ARM_UC_PAL_FlashIAP_GetCapabilities(void)
00024 {
00025     ARM_UC_PAAL_UPDATE_CAPABILITIES result = {
00026         .installer_arm_hash = 0,
00027         .installer_oem_hash = 0,
00028         .installer_layout   = 0,
00029         .firmware_hash      = 1,
00030         .firmware_hmac      = 0,
00031         .firmware_campaign  = 0,
00032         .firmware_version   = 1,
00033         .firmware_size      = 1
00034     };
00035 
00036     return result;
00037 }
00038 
00039 const ARM_UC_PAAL_UPDATE ARM_UCP_FLASHIAP =
00040 {
00041     .Initialize                 = ARM_UC_PAL_FlashIAP_Initialize,
00042     .GetCapabilities            = ARM_UC_PAL_FlashIAP_GetCapabilities,
00043     .GetMaxID                   = ARM_UC_PAL_FlashIAP_GetMaxID,
00044     .Prepare                    = ARM_UC_PAL_FlashIAP_Prepare,
00045     .Write                      = ARM_UC_PAL_FlashIAP_Write,
00046     .Finalize                   = ARM_UC_PAL_FlashIAP_Finalize,
00047     .Read                       = ARM_UC_PAL_FlashIAP_Read,
00048     .Activate                   = ARM_UC_PAL_FlashIAP_Activate,
00049     .GetActiveFirmwareDetails   = ARM_UC_PAL_FlashIAP_GetActiveDetails,
00050     .GetFirmwareDetails         = ARM_UC_PAL_FlashIAP_GetFirmwareDetails,
00051     .GetInstallerDetails        = ARM_UC_PAL_FlashIAP_GetInstallerDetails
00052 };