-
Notifications
You must be signed in to change notification settings - Fork 4
/
cy_dfu_bwc_macro.h
177 lines (145 loc) · 9.18 KB
/
cy_dfu_bwc_macro.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/***************************************************************************//**
* \file cy_dfu.h
* \version 5.2
*
* Provides API declarations for the BWC with Bootloader SDK.
*
********************************************************************************
* \copyright
* (c) (2016-2024), 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 */