Skip to content
Permalink
f2b8a3dfbd
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
177 lines (145 sloc) 9.18 KB
/***************************************************************************//**
* \file cy_dfu.h
* \version 5.1
*
* Provides API declarations for the BWC with Bootloader SDK.
*
********************************************************************************
* \copyright
* (c) (2016-2023), Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
********************************************************************************
* This software, including source code, documentation and related materials
* ("Software") is owned by Cypress Semiconductor Corporation or one of its
* affiliates ("Cypress") and is protected by and subject to worldwide patent
* protection (United States and foreign), United States copyright laws and
* international treaty provisions. Therefore, you may use this Software only
* as provided in the license agreement accompanying the software package from
* which you obtained this Software ("EULA").
*
* If no EULA applies, Cypress hereby grants you a personal, non-exclusive,
* non-transferable license to copy, modify, and compile the Software source
* code solely for use in connection with Cypress's integrated circuit products.
* Any reproduction, modification, translation, compilation, or representation
* of this Software except as specified above is prohibited without the express
* written permission of Cypress.
*
* Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress
* reserves the right to make changes to the Software without notice. Cypress
* does not assume any liability arising out of the application or use of the
* Software or any product or circuit described in the Software. Cypress does
* not authorize its products for use in any products where a malfunction or
* failure of the Cypress product may reasonably be expected to result in
* significant property damage, injury or death ("High Risk Product"). By
* including Cypress's product in a High Risk Product, the manufacturer of such
* system or application assumes all risk of such use and in doing so agrees to
* indemnify Cypress against all liability.
*******************************************************************************/
#if !defined(CY_DFU_BWC_MACRO_H)
#define CY_DFU_BWC_MACRO_H
/** \cond INTERNAL */
/*******************************************************************************
* The following code is DEPRECATED and must not be used. Kept for backward
* compatibility.
*******************************************************************************/
/* cy_dfu.h*/
#define CY_BOOTLOADER_SDK_VERSION_MAJOR CY_DFU_SDK_VERSION_MAJOR
#define CY_BOOTLOADER_SDK_VERSION_MINOR CY_DFU_SDK_VERSION_MINOR
#define CY_BOOTLOAD_STATE_NONE CY_DFU_STATE_NONE
#define CY_BOOTLOAD_STATE_BOOTLOADING CY_DFU_STATE_UPDATING
#define CY_BOOTLOAD_STATE_FINISHED CY_DFU_STATE_FINISHED
#define CY_BOOTLOAD_STATE_FAILED CY_DFU_STATE_FAILED
#define CY_BOOTLOAD_PACKET_MIN_SIZE CY_DFU_PACKET_MIN_SIZE
#define CY_BOOTLOAD_CMD_ENTER CY_DFU_CMD_ENTER
#define CY_BOOTLOAD_CMD_EXIT CY_DFU_CMD_EXIT
#define CY_BOOTLOAD_CMD_PROGRAM_DATA CY_DFU_CMD_PROGRAM_DATA
#define CY_BOOTLOAD_CMD_VERIFY_DATA CY_DFU_CMD_VERIFY_DATA
#define CY_BOOTLOAD_CMD_ERASE_DATA CY_DFU_CMD_ERASE_DATA
#define CY_BOOTLOAD_CMD_VERIFY_APP CY_DFU_CMD_VERIFY_APP
#define CY_BOOTLOAD_CMD_SEND_DATA CY_DFU_CMD_SEND_DATA
#define CY_BOOTLOAD_CMD_SEND_DATA_WR CY_DFU_CMD_SEND_DATA_WR
#define CY_BOOTLOAD_CMD_SYNC CY_DFU_CMD_SYNC
#define CY_BOOTLOAD_CMD_SET_APP_META CY_DFU_CMD_SET_APP_META
#define CY_BOOTLOAD_CMD_GET_METADATA CY_DFU_CMD_GET_METADATA
#define CY_BOOTLOAD_CMD_SET_EIVECTOR CY_DFU_CMD_SET_EIVECTOR
#define CY_BOOTLOAD_IOCTL_READ CY_DFU_IOCTL_READ
#define CY_BOOTLOAD_IOCTL_COMPARE CY_DFU_IOCTL_COMPARE
#define CY_BOOTLOAD_IOCTL_WRITE CY_DFU_IOCTL_WRITE
#define CY_BOOTLOAD_IOCTL_ERASE CY_DFU_IOCTL_ERASE
#define CY_BOOTLOAD_IOCTL_BHP CY_DFU_IOCTL_BHP
#define CY_BOOTLOAD_RSP_SIZE_0 CY_DFU_RSP_SIZE_0
#define CY_BOOTLOAD_RSP_SIZE_VERIFY_APP CY_DFU_RSP_SIZE_VERIFY_APP
#define CY_BOOTLOAD_ID CY_DFU_ID
#define CY_BOOTLOAD_BASIC_APP CY_DFU_BASIC_APP
#define CY_BOOTLOAD_CYPRESS_APP CY_DFU_CYPRESS_APP
#define CY_BOOTLOAD_SIMPLIFIED_APP CY_DFU_SIMPLIFIED_APP
#define CY_BOOTLOAD_VERIFY_FAST CY_DFU_VERIFY_FAST
#define CY_BOOTLOAD_VERIFY_FULL CY_DFU_VERIFY_FULL
/* Types */
#define cy_stc_bootload_params_t cy_stc_dfu_params_t
#define cy_stc_bootload_enter_t cy_stc_dfu_enter_t
#define cy_en_bootload_status_t cy_en_dfu_status_t
/* Enums */
#define CY_BOOTLOAD_SUCCESS CY_DFU_SUCCESS
#define CY_BOOTLOAD_ERROR_VERIFY CY_DFU_ERROR_VERIFY
#define CY_BOOTLOAD_ERROR_LENGTH CY_DFU_ERROR_LENGTH
#define CY_BOOTLOAD_ERROR_DATA CY_DFU_ERROR_DATA
#define CY_BOOTLOAD_ERROR_CMD CY_DFU_ERROR_CMD
#define CY_BOOTLOAD_ERROR_CHECKSUM CY_DFU_ERROR_CHECKSUM
#define CY_BOOTLOAD_ERROR_ADDRESS CY_DFU_ERROR_ADDRESS
#define CY_BOOTLOAD_ERROR_TIMEOUT CY_DFU_ERROR_TIMEOUT /* */
#define CY_BOOTLOAD_ERROR_UNKNOWN CY_DFU_ERROR_UNKNOWN
/* Functions */
#define Cy_Bootload_DoBootload Cy_DFU_Complete
#define Cy_Bootload_Init Cy_DFU_Init
#define Cy_Bootload_Continue Cy_DFU_Continue/* */
#define Cy_Bootload_ExecuteApp Cy_DFU_ExecuteApp
#define Cy_Bootload_SwitchToApp Cy_DFU_SwitchToApp
#define Cy_Bootload_DataChecksum Cy_DFU_DataChecksum
#define Cy_Bootload_ValidateMetadata Cy_DFU_ValidateMetadata
#define Cy_Bootload_ValidateApp Cy_DFU_ValidateApp
#define Cy_Bootload_GetRunningApp Cy_DFU_GetRunningApp
#define Cy_Bootload_GetAppMetadata Cy_DFU_GetAppMetadata
#define Cy_Bootload_SetAppMetadata Cy_DFU_SetAppMetadata
#define Cy_Bootload_CopyApp Cy_DFU_CopyApp
#define Cy_Bootload_OnResetApp0 Cy_DFU_OnResetApp0
#define Cy_Bootload_ReadData Cy_DFU_ReadData
#define Cy_Bootload_WriteData Cy_DFU_WriteData
#define Cy_Bootload_TransportRead Cy_DFU_TransportRead
#define Cy_Bootload_TransportWrite Cy_DFU_TransportWrite
#define Cy_Bootload_TransportReset Cy_DFU_TransportReset
#define Cy_Bootload_TransportStart Cy_DFU_TransportStart
#define Cy_Bootload_TransportStop Cy_DFU_TransportStop
/* Field of structure */
#define enterBootloaderVersion enterDFUVersion
/*USER config*/
#define CY_BOOTLOAD_SILICON_ID CY_DFU_SILICON_ID
#define CY_BOOTLOAD_SILICON_REV CY_DFU_SILICON_REV
#define CY_BOOTLOAD_SIZEOF_CMD_BUFFER CY_DFU_SIZEOF_CMD_BUFFER
#define CY_BOOTLOAD_SIZEOF_DATA_BUFFER CY_DFU_SIZEOF_DATA_BUFFER
#define CY_BOOTLOAD_OPT_GOLDEN_IMAGE CY_DFU_OPT_GOLDEN_IMAGE
#define CY_BOOTLOAD_GOLDEN_IMAGE_IDS CY_DFU_GOLDEN_IMAGE_IDS
#define CY_BOOTLOAD_MAX_APPS CY_DFU_MAX_APPS
#define CY_BOOTLOAD_OPT_VERIFY_DATA CY_DFU_OPT_VERIFY_DATA
#define CY_BOOTLOAD_OPT_ERASE_DATA CY_DFU_OPT_ERASE_DATA
#define CY_BOOTLOAD_OPT_VERIFY_APP CY_DFU_OPT_VERIFY_APP
#define CY_BOOTLOAD_OPT_SEND_DATAGet CY_DFU_OPT_SEND_DATAGet
#define CY_BOOTLOAD_OPT_GET_METADATA CY_DFU_OPT_GET_METADATA
#define CY_BOOTLOAD_OPT_SET_EIVECTOR CY_DFU_OPT_SET_EIVECTOR
#define CY_BOOTLOAD_METADATA_WRITABLE CY_DFU_METADATA_WRITABLE
#define CY_BOOTLOAD_OPT_CRYPTO_HW CY_DFU_OPT_CRYPTO_HW
#define CY_BOOTLOAD_OPT_PACKET_CRC CY_DFU_OPT_PACKET_CRC
#define CY_BOOTLOAD_APP_FORMAT CY_DFU_APP_FORMAT
#define CY_BOOTLOAD_SEC_APP_VERIFY_TYPE CY_DFU_SEC_APP_VERIFY_TYPE
#define CY_BOOTLOAD_APP0_VERIFY_START CY_DFU_APP0_VERIFY_START
#define CY_BOOTLOAD_APP0_VERIFY_LENGTH CY_DFU_APP0_VERIFY_LENGTH
#define CY_BOOTLOAD_APP1_VERIFY_START CY_DFU_APP1_VERIFY_START
#define CY_BOOTLOAD_APP1_VERIFY_LENGTH CY_DFU_APP1_VERIFY_LENGTH
#define CY_BOOTLOAD_SIGNATURE_SIZE CY_DFU_SIGNATURE_SIZE
/* transport_ble.h*/
#define BootloaderCallBack DFUCallBack
/** \endcond */
#endif /* !defined(CY_DFU_BWC_MACRO_H) */
/* [] END OF FILE */