1 /***************************************************************************//**
2 * \file cy_efuse.h
3 * \version 2.40
4 *
5 * Provides the API declarations of the eFuse driver.
6 *
7 ********************************************************************************
8 * \copyright
9 * Copyright 2017-2020 Cypress Semiconductor Corporation
10 * SPDX-License-Identifier: Apache-2.0
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 *     http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *******************************************************************************/
24 
25 #if !defined(CY_EFUSE_H)
26 #define CY_EFUSE_H
27 
28 /**
29 * \addtogroup group_efuse
30 * \{
31 *
32 * Electronic Fuses (eFuses) are non-volatile memory where each bit is one-time
33 * programmable (OTP).
34 *
35 * The functions and other declarations used in this driver are in cy_efuse.h.
36 * You can include cy_pdl.h to get access to all functions
37 * and declarations in the PDL.
38 *
39 * The eFuse driver enables reading the state of any bit.
40 * - CAT1A devices does not support writing to eFuse memory. Writing an
41 *   eFuse bit is typically done by a production programmer.
42 *   Fuses are programmed via the PSoC Programmer tool that parses the hex file
43 *   and extracts the necessary information; the fuse data must be located at the
44 *   dedicated section in the hex file. For more details see
45 *   [PSoC 6 Programming Specifications]
46 *   (http://www.cypress.com/documentation/programming-specifications/psoc-6-programming-specifications)
47 * - CAT1B devices support writing to eFuse memory.
48 *     \note Blowing eFuses is normally performed during device provisioning; eFuses are not intended to be
49 *     programmed by the customer
50 * - CAT1C devices does not support writing to eFuse memory.
51 *
52 * One eFuse macro consists of 256 bits (32 * 8).
53 * Consult the device-specific datasheet to determine how many
54 * macros a device has. These are implemented as a regular Advanced
55 * High-performance Bus (AHB) peripheral with the following characteristics:
56 * - eFuses are used to control the device life-cycle stage (NORMAL, SECURE,
57 *   and SECURE_WITH_DEBUG) and the protection settings;
58 * - eFuse memory can be programmed (eFuse bit value changed from '0' to '1')
59 *   only once; if an eFuse bit is blown, it cannot be cleared again;
60 *
61 * \section group_efuse_configuration Configuration Considerations
62 *
63 * The eFuse driver provides the simplest way to read and write eFuse memory.
64 * No configuration is needed.
65 *
66 * \section group_efuse_more_information More Information
67 *
68 * Refer to the technical reference manual (TRM) and the device datasheet.
69 *
70 * \section group_efuse_changelog Changelog
71 * <table class="doxtable">
72 *   <tr><th>Version</th><th>Changes</th><th>Reason for Change</th></tr>
73 *   <tr>
74 *     <td>2.40</td>
75 *     <td>Updated API \ref Cy_EFUSE_WriteWord and \ref Cy_EFUSE_ReadWord.</td>
76 *     <td>Bug fixes.</td>
77 *   </tr>
78 *   <tr>
79 *     <td>2.30.1</td>
80 *     <td>Minor documentation updates.</td>
81 *     <td>Added a note for CAT1B family of devices.</td>
82 *   </tr>
83 *   <tr>
84 *     <td>2.30</td>
85 *     <td>Updated Cy_EFUSE_WriteBit API.</td>
86 *     <td>Fix minor compilation warning.</td>
87 *   </tr>
88 *   <tr>
89 *     <td>2.20</td>
90 *     <td>Updated driver to support the CAT1C family of devices.</td>
91 *     <td>Added new family of devices.</td>
92 *   </tr>
93 *   <tr>
94 *     <td>2.10</td>
95 *     <td>Implementation for newly introduced APIs for CAT1B devices has been updated.</td>
96 *     <td>Updated driver APIs support for CAT1B devices.</td>
97 *   </tr>
98 *   <tr>
99 *     <td>2.0</td>
100 *     <td>Added the following functions: \ref Cy_EFUSE_Init,\n \ref Cy_EFUSE_DeInit,\n \ref Cy_EFUSE_Enable,\n
101 *         \ref Cy_EFUSE_Disable,\n \ref Cy_EFUSE_WriteBit,\n \ref Cy_EFUSE_WriteByte,\n \ref Cy_EFUSE_WriteWord,\n
102 *         \ref Cy_EFUSE_WriteWordArray,\n \ref Cy_EFUSE_ReadBit,\n \ref Cy_EFUSE_ReadByte,\n \ref Cy_EFUSE_ReadWord,\n
103 *         \ref Cy_EFUSE_ReadWordArray,\n \ref Cy_EFUSE_WriteBootRow,\n \ref Cy_EFUSE_ReadBootRow.</td>
104 *     <td>New driver APIs support for CAT1B devices.</td>
105 *   </tr>
106 *   <tr>
107 *     <td>1.10.4</td>
108 *     <td>Minor documentation updates.</td>
109 *     <td>Removed MISRA 2004 compliance details and verified MISRA 2012 compliance.</td>
110 *   </tr>
111 *   <tr>
112 *     <td>1.10.3</td>
113 *     <td>Minor documentation updates.</td>
114 *     <td>Documentation enhancement.</td>
115 *   </tr>
116 *   <tr>
117 *     <td>1.10.2</td>
118 *     <td>Fix driver header path.</td>
119 *     <td>Folder structure changed.</td>
120 *   </tr>
121 *   <tr>
122 *     <td>1.10.1</td>
123 *     <td>Added header guard CY_IP_MXEFUSE.</td>
124 *     <td>To enable the PDL compilation with wounded out IP blocks.</td>
125 *   </tr>
126 *   <tr>
127 *     <td>1.10</td>
128 *     <td>Flattened the organization of the driver source code into the single
129 *         source directory and the single include directory.
130 *     </td>
131 *     <td>Driver library directory-structure simplification.</td>
132 *   </tr>
133 *   <tr>
134 *     <td>1.0</td>
135 *     <td>Initial version</td>
136 *     <td></td>
137 *   </tr>
138 * </table>
139 *
140 * \defgroup group_efuse_macros Macros
141 * \defgroup group_efuse_functions Functions
142 * \defgroup group_efuse_data_structures Data Structures
143 * \defgroup group_efuse_enumerated_types Enumerated Types
144 */
145 
146 #include "cy_device.h"
147 
148 #if defined CY_IP_MXEFUSE
149 
150 #include "cy_syslib.h"
151 
152 /***************************************
153 * Macro Definitions
154 ***************************************/
155 /**
156 * \addtogroup group_efuse_macros
157 * \{
158 */
159 
160 /** The driver major version */
161 #define CY_EFUSE_DRV_VERSION_MAJOR          2
162 /** The driver minor version */
163 #define CY_EFUSE_DRV_VERSION_MINOR          40
164 /** The eFuse driver identifier */
165 #define CY_EFUSE_ID                         (CY_PDL_DRV_ID(0x1AUL))
166 /** The number of bits in the byte */
167 #define CY_EFUSE_BITS_PER_BYTE              (8UL)
168 /** \} group_efuse_macros */
169 
170 /***************************************
171 * Enumerated Types
172 ***************************************/
173 /**
174 * \addtogroup group_efuse_enumerated_types
175 * \{
176 */
177 /** This enum has the return values of the eFuse driver */
178 typedef enum
179 {
180     CY_EFUSE_SUCCESS               = 0x00UL,  /**< Success */
181     CY_EFUSE_INVALID_PROTECTION    = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x01UL, /**< Invalid access in the current protection state */
182     CY_EFUSE_INVALID_FUSE_ADDR     = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x02UL, /**< Invalid eFuse address */
183     CY_EFUSE_BAD_PARAM             = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x03UL, /**< One or more invalid parameters */
184     CY_EFUSE_IPC_BUSY              = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x04UL, /**< The IPC structure is already locked by another process */
185     CY_EFUSE_WRITE_BUSY            = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x05UL, /**< Previous write operation in progress
186                                                                                    * \note Supported in CAT1B devices. */
187     CY_EFUSE_WRITE_ERROR           = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x06UL, /**< Write operation failed. Retry operation.
188                                                                                    * \note Supported in CAT1B devices. */
189     CY_EFUSE_WRITE_TIMEOUT_ERROR   = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0x07UL, /**< Timeout Error in Write Operation
190                                                                                    * \note Supported in CAT1B devices. */
191     CY_EFUSE_ERR_UNC               = CY_EFUSE_ID | CY_PDL_STATUS_ERROR | 0xFFUL  /**< Unknown error code. See Cy_EFUSE_GetExternalStatus() */
192 } cy_en_efuse_status_t;
193 
194 /** \} group_efuse_data_structure */
195 
196 #if defined(__cplusplus)
197 extern "C" {
198 #endif
199 
200 /*******************************************************************************
201 *                            Function Prototypes
202 *******************************************************************************/
203 
204 /**
205 * \addtogroup group_efuse_functions
206 * \{
207 */
208 #if (CY_IP_MXEFUSE_VERSION <= 2) || defined (CY_DOXYGEN)
209 /*******************************************************************************
210 * Function Name: Cy_EFUSE_GetEfuseBit
211 ****************************************************************************//**
212 *
213 * Reports the current state of a given eFuse bit-number. Consult the device TRM
214 * to determine the target fuse bit number.
215 *
216 * \note An attempt to read an eFuse data from a protected memory region
217 * will generate a HardFault.
218 *
219 * \param bitNum
220 * The number of the bit to read. The valid range of the bit number is
221 * from 0 to EFUSE_EFUSE_NR * 32 * 8 - 1 where:
222 * - EFUSE_EFUSE_NR is number of efuse macros in the selected device series,
223 * - 32 is a number of fuse bytes in one efuse macro,
224 * - 8 is a number of fuse bits in the byte.
225 *
226 * The EFUSE_EFUSE_NR macro is defined in the series-specific header file, e.g
227 * \e \<PDL_DIR\>/devices/include/psoc6_01_config.\e h
228 *
229 * \param bitVal
230 * The pointer to the location to store the bit value.
231 *
232 * \return
233 * \ref cy_en_efuse_status_t
234 *
235 * \note
236 * Supported in CAT1A and CAT1C devices.
237 *
238 * \funcusage
239 * The example below shows how to read device life-cycle register bits in
240 * PSoC 6:
241 * \snippet efuse/snippet/main.c SNIPPET_EFUSE_READ_BIT
242 *
243 *******************************************************************************/
244 cy_en_efuse_status_t Cy_EFUSE_GetEfuseBit(uint32_t bitNum, bool *bitVal);
245 
246 
247 /*******************************************************************************
248 * Function Name: Cy_EFUSE_GetEfuseByte
249 ****************************************************************************//**
250 *
251 * Reports the current state of the eFuse byte.
252 * If the offset parameter is beyond the available quantities,
253 * zeroes will be stored to the byteVal parameter. Consult the device TRM
254 * to determine the target fuse byte offset.
255 *
256 * \note An attempt to read an eFuse data from a protected memory region
257 * will generate a HardFault.
258 *
259 * \param offset
260 * The offset of the byte to read. The valid range of the byte offset is
261 * from 0 to EFUSE_EFUSE_NR * 32 - 1 where:
262 * - EFUSE_EFUSE_NR is a number of efuse macros in the selected device series,
263 * - 32 is a number of fuse bytes in one efuse macro.
264 *
265 * The EFUSE_EFUSE_NR macro is defined in the series-specific header file, e.g
266 * \e \<PDL_DIR\>/devices/include/psoc6_01_config.\e h
267 *
268 * \param byteVal
269 * The pointer to the location to store eFuse data.
270 *
271 * \return
272 * \ref cy_en_efuse_status_t
273 *
274 * \note
275 * Supported in CAT1A and CAT1C devices.
276 *
277 * \funcusage
278 * The example below shows how to read a device life-cycle stage register in
279 * PSoC 6:
280 * \snippet efuse/snippet/main.c SNIPPET_EFUSE_READ_LIFECYCLE
281 *
282 *******************************************************************************/
283 cy_en_efuse_status_t Cy_EFUSE_GetEfuseByte(uint32_t offset, uint8_t *byteVal);
284 
285 
286 /*******************************************************************************
287 * Function Name: Cy_EFUSE_GetExternalStatus
288 ****************************************************************************//**
289 *
290 * This function handles the case where a module such as a security image captures
291 * a system call from this driver and reports its own status or error code,
292 * for example, protection violation. In that case, a function from this
293 * driver returns an unknown error (see \ref cy_en_efuse_status_t). After receipt
294 * of an unknown error, the user may call this function to get the status
295 * of the capturing module.
296 *
297 * The user is responsible for parsing the content of the returned value
298 * and casting it to the appropriate enumeration.
299 *
300 * \return
301 * The error code of the previous efuse operation.
302 *
303 * \note
304 * Supported in CAT1A and CAT1C devices.
305 *
306 *******************************************************************************/
307 uint32_t Cy_EFUSE_GetExternalStatus(void);
308 #endif
309 
310 #if (CY_IP_MXEFUSE_VERSION >= 3) || defined (CY_DOXYGEN)
311 
312 /*******************************************************************************
313 * Function Name: Cy_EFUSE_Init
314 ****************************************************************************//**
315 *
316 * This function enables the EFUSE block and initializes the registers with the
317 * default values.
318 *
319 * \param base
320 * The pointer to the EFUSE instance.
321 *
322 * \return
323 * The EFUSE API status \ref cy_en_efuse_status_t.
324 *
325 * \note
326 * Supported in CAT1B devices.
327 *
328 *******************************************************************************/
329 cy_en_efuse_status_t Cy_EFUSE_Init(EFUSE_Type *base);
330 
331 
332 /*******************************************************************************
333 * Function Name: Cy_EFUSE_Enable
334 ****************************************************************************//**
335 *
336 * Enables the EFUSE block.
337 *
338 * \param base
339 * The pointer to the EFUSE instance.
340 *
341 * \note
342 * Supported in CAT1B devices.
343 *
344 *******************************************************************************/
345 void Cy_EFUSE_Enable(EFUSE_Type *base);
346 
347 
348 /*******************************************************************************
349 * Function Name: Cy_EFUSE_Disable
350 ****************************************************************************//**
351 *
352 * Disables the EFUSE block. All non-retention registers (command and status
353 * registers) are reset to their default values when the IP is disabled.
354 *
355 * \param base
356 * The pointer to the EFUSE instance.
357 *
358 * \note
359 * Supported in CAT1B devices.
360 *
361 *******************************************************************************/
362 void Cy_EFUSE_Disable(EFUSE_Type *base);
363 
364 /*******************************************************************************
365 * Function Name: Cy_EFUSE_IsEnabled
366 ****************************************************************************//**
367 *
368 * Check if EFUSE block is Enabled or Not.
369 *
370 * \param base
371 * The pointer to the EFUSE instance.
372 *
373 * \return
374 * - True if the EFUSE is enabled.
375 * - False if EFUSE is disabled.
376 *
377 * \note
378 * Supported in CAT1B devices.
379 *
380 *******************************************************************************/
381 bool Cy_EFUSE_IsEnabled(EFUSE_Type *base);
382 
383 
384 /*******************************************************************************
385 * Function Name: Cy_EFUSE_DeInit
386 ****************************************************************************//**
387 *
388 * Disables the EFUSE block. All non-retention registers (command and status
389 * registers) are reset to their default values when the IP is disabled.
390 *
391 * \param base
392 * The pointer to the EFUSE instance.
393 *
394 * \note
395 * Supported in CAT1B devices.
396 *
397 *******************************************************************************/
398 void Cy_EFUSE_DeInit(EFUSE_Type *base);
399 
400 
401 /*******************************************************************************
402 * Function Name: Cy_EFUSE_WriteBit
403 ****************************************************************************//**
404 *
405 * Writes a bit to EFUSE by blowing a fuse, so this function is able to write 1s
406 * only. Before write operations you must call \ref Cy_EFUSE_Init().
407 * It is recommended to disable the block when not using it. Call
408 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
409 *
410 * \param base
411 * The pointer to the EFUSE instance.
412 *
413 * \param bitPos
414 * Bit position within byte.
415 *
416 * \param offset
417 * Byte position within EFUSE address space.
418 *
419 * \return
420 * The EFUSE API status \ref cy_en_efuse_status_t.
421 *
422 * \note
423 * - The caller is expected to verify the input parameters for correctness
424 *  and to check whether the bit is already blown before calling this function
425 *  to not over-program bits.
426 * - Supported in CAT1B devices.
427 *
428 *******************************************************************************/
429 cy_en_efuse_status_t Cy_EFUSE_WriteBit(EFUSE_Type *base, uint32_t bitPos, uint32_t offset);
430 
431 
432 /*******************************************************************************
433 * Function Name: Cy_EFUSE_WriteByte
434 ****************************************************************************//**
435 *
436 * Writes one byte.
437 * Before write operations you must call \ref Cy_EFUSE_Init().
438 * It is recommended to disable the block when not using it. Call
439 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
440 *
441 * \param base
442 * The pointer to the EFUSE instance.
443 *
444 * \param src
445 * Value to be written.
446 *
447 * \param offset
448 * Byte offset from the EFUSE base address
449 *
450 * \return
451 * The EFUSE API status \ref cy_en_efuse_status_t.
452 *
453 * \note
454 * - The caller is expected to check whether the bits within the byte
455 *  are already blown before calling this function to not over-program bits.
456 * - Supported in CAT1B devices.
457 *******************************************************************************/
458 cy_en_efuse_status_t Cy_EFUSE_WriteByte(EFUSE_Type *base, uint32_t src, uint32_t offset);
459 
460 
461 /*******************************************************************************
462 * Function Name: Cy_EFUSE_WriteWord
463 ****************************************************************************//**
464 *
465 * Writes every bit set in src that was not already programmed.
466 * Before write operations you must call \ref Cy_EFUSE_Init().
467 * It is recommended to disable the block when not using it. Call
468 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
469 *
470 * \param base
471 * The pointer to the EFUSE instance.
472 *
473 * \param src
474 * Value to be written.
475 *
476 * \param offset
477 * Offset from the EFUSE base address. Must be 4-byte aligned.
478 *
479 * \return
480 * The EFUSE API status \ref cy_en_efuse_status_t.
481 *
482 * \note
483 * - The caller is expected to check whether the bits within the 32-bit word
484 *  are already blown before calling this function to not over-program bits.
485 * - Supported in CAT1B devices.
486 *
487 *******************************************************************************/
488 cy_en_efuse_status_t Cy_EFUSE_WriteWord(EFUSE_Type *base, uint32_t src, uint32_t offset);
489 
490 
491 /*******************************************************************************
492 * Function Name: Cy_EFUSE_WriteWordArray
493 ****************************************************************************//**
494 *
495 * Writes the values of num 32-bit words from the location pointed to by src to
496 * the EFUSE location pointed to by offset.
497 *
498 * Before write operations you must call \ref Cy_EFUSE_Init().
499 * It is recommended to disable the block when not using it. Call
500 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
501 *
502 * \param base
503 * The pointer to the EFUSE instance.
504 *
505 * \param src
506 * Pointer to the source of data to be written.
507 *
508 * \param offset
509 * Offset from the EFUSE base address. Must be 4-byte aligned.
510 *
511 * \param num
512 * Number of 32-bit words to be written.
513 *
514 * \return
515 * The EFUSE API status \ref cy_en_efuse_status_t.
516 *
517 * \note
518 * - The caller is expected to check whether the bits within the 32-bit words
519 *  are already blown before calling this function to not over-program bits.
520 * - Supported in CAT1B devices.
521 *
522 *******************************************************************************/
523 cy_en_efuse_status_t Cy_EFUSE_WriteWordArray(EFUSE_Type *base, const uint32_t *src, uint32_t offset, uint32_t num);
524 
525 /*******************************************************************************
526 * Function Name: Cy_EFUSE_ReadBit
527 ****************************************************************************//**
528 *
529 * Reads a bit from EFUSE.
530 * Before read operations you must call \ref Cy_EFUSE_Init().
531 * It is recommended to disable the block when not using it.
532 * Call \ref Cy_EFUSE_Disable() to disable the EFUSE block.
533 *
534 * \param base
535 * The pointer to the EFUSE instance.
536 *
537 * \param dst
538 * Pointer to the destination where the read bit is stored.
539 *
540 * \param bitPos
541 * Bit position within byte.
542 *
543 * \param offset
544 * Byte offset from the EFUSE base address.
545 *
546 * \return
547 * The EFUSE API status \ref cy_en_efuse_status_t.
548 *
549 * \note
550 * Supported in CAT1B devices.
551 *
552 *******************************************************************************/
553 cy_en_efuse_status_t Cy_EFUSE_ReadBit(EFUSE_Type *base, uint8_t *dst, uint32_t bitPos, uint32_t offset);
554 
555 /*******************************************************************************
556 * Function Name: Cy_EFUSE_ReadByte
557 ****************************************************************************//**
558 *
559 * Reads byte from EFUSE.
560 * Before read operations you must call \ref Cy_EFUSE_Init().
561 * It is recommended to disable the block when not using it. Call
562 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
563 *
564 * \param base
565 * The pointer to the EFUSE instance.
566 *
567 * \param dst
568 * Pointer to the destination where the read byte is stored.
569 *
570 * \param offset
571 * Byte offset from the EFUSE base address.
572 *
573 * \return
574 * The EFUSE API status \ref cy_en_efuse_status_t.
575 *
576 * \note
577 * Supported in CAT1B devices.
578 *
579 *******************************************************************************/
580 cy_en_efuse_status_t Cy_EFUSE_ReadByte(EFUSE_Type *base, uint8_t *dst, uint32_t offset);
581 
582 
583 /*******************************************************************************
584 * Function Name: Cy_EFUSE_ReadWord
585 ****************************************************************************//**
586 *
587 * Reads a 32-bit word from EFUSE.
588 * Before read operations you must call \ref Cy_EFUSE_Init().
589 * It is recommended to disable the block when not using it. Call
590 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
591 *
592 * \param base
593 * The pointer to the EFUSE instance.
594 *
595 * \param dst
596 * Pointer to the destination where the read word is stored.
597 *
598 * \param offset
599 * Offset from the EFUSE base address. Must be 4-byte aligned.
600 *
601 * \return
602 * The EFUSE API status \ref cy_en_efuse_status_t.
603 *
604 * \note
605 * Supported in CAT1B devices.
606 *
607 *******************************************************************************/
608 cy_en_efuse_status_t Cy_EFUSE_ReadWord(EFUSE_Type *base, uint32_t *dst, uint32_t offset);
609 
610 
611 /*******************************************************************************
612 * Function Name: Cy_EFUSE_ReadWordArray
613 ****************************************************************************//**
614 *
615 * Reads an array of 32-bit words from EFUSE.
616 * Before read operations you must call \ref Cy_EFUSE_Init().
617 * It is recommended to disable the block when not using it. Call
618 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
619 *
620 * \param base
621 * The pointer to the EFUSE instance.
622 *
623 * \param dst
624 * Pointer to the destination array where the content is to be read.
625 *
626 * \param offset
627 * Start address of the data to read in EFUSE.
628 *
629 * \param num
630 * Number of words to read.
631 *
632 * \return
633 * The EFUSE API status \ref cy_en_efuse_status_t.
634 *
635 * \note
636 * Supported in CAT1B devices.
637 *
638 *******************************************************************************/
639 cy_en_efuse_status_t Cy_EFUSE_ReadWordArray(EFUSE_Type *base, uint32_t *dst, uint32_t offset, uint32_t num);
640 
641 
642 /*******************************************************************************
643 * Function Name: Cy_EFUSE_WriteBootRow
644 ****************************************************************************//**
645 *
646 * Writes data into BOOTROW.
647 * Before write operations you must call \ref Cy_EFUSE_Init().
648 * It is recommended to disable the block when not using it. Call
649 * \ref Cy_EFUSE_Disable() to disable the EFUSE block.
650 *
651 * \param base
652 * The pointer to the EFUSE instance.
653 *
654 * \param bootrow
655 * 32-bit value to be written into bootrow.
656 *
657 * \return
658 * The EFUSE API status \ref cy_en_efuse_status_t.
659 *
660 * \note
661 * Supported in CAT1B devices.
662 *
663 *******************************************************************************/
664 cy_en_efuse_status_t Cy_EFUSE_WriteBootRow(EFUSE_Type *base, uint32_t bootrow);
665 
666 
667 /*******************************************************************************
668 * Function Name: Cy_EFUSE_ReadBootRow
669 ****************************************************************************//**
670 *
671 * Reads data from BOOTROW.
672 * The BOOTROW information is latched upon system reset and is readable as
673 * MMIO register.
674 *
675 * \param base
676 * The pointer to the EFUSE instance.
677 *
678 * \param bootrow
679 * Pointer to the variable where the content of BOOTROW is read to.
680 *
681 * \return
682 * The EFUSE API status \ref cy_en_efuse_status_t.
683 *
684 * \note
685 * Supported in CAT1B devices.
686 *
687 *******************************************************************************/
688 cy_en_efuse_status_t Cy_EFUSE_ReadBootRow(EFUSE_Type *base, uint32_t *bootrow);
689 #endif
690 
691 /** \} group_efuse_functions */
692 
693 #if defined(__cplusplus)
694 }
695 #endif
696 
697 #endif /* #ifdef CY_IP_MXEFUSE */
698 
699 #endif /* #if !defined(CY_EFUSE_H) */
700 
701 /** \} group_efuse */
702 
703 
704 /* [] END OF FILE */
705