MAX32675 Peripheral Driver API
Peripheral Driver API for the MAX32675
infoblock.h
1 
9 /*******************************************************************************
10 * Copyright (C) Maxim Integrated Products, Inc., All rights Reserved.
11 *
12 * This software is protected by copyright laws of the United States and
13 * of foreign countries. This material may also be protected by patent laws
14 * and technology transfer regulations of the United States and of foreign
15 * countries. This software is furnished under a license agreement and/or a
16 * nondisclosure agreement and may only be used or reproduced in accordance
17 * with the terms of those agreements. Dissemination of this information to
18 * any party or parties not specified in the license agreement and/or
19 * nondisclosure agreement is expressly prohibited.
20 *
21 * The above copyright notice and this permission notice shall be included
22 * in all copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
28 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
29 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
30 * OTHER DEALINGS IN THE SOFTWARE.
31 *
32 * Except as contained in this notice, the name of Maxim Integrated
33 * Products, Inc. shall not be used except as stated in the Maxim Integrated
34 * Products, Inc. Branding Policy.
35 *
36 * The mere transfer of this software does not imply any licenses
37 * of trade secrets, proprietary technology, copyrights, patents,
38 * trademarks, maskwork rights, or any other form of intellectual
39 * property whatsoever. Maxim Integrated Products, Inc. retains all
40 * ownership rights.
41 *******************************************************************************
42 */
43 
44 #ifndef _INFOBLOCK_H_
45 #define _INFOBLOCK_H_
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 #if !defined(TRUE) || !defined(FALSE)
52 #define TRUE 1
53 #define FALSE 0
54 #endif
55 
71 #define INFOBLOCK_LINE_SIZE 8
72 
76 #define INFOBLOCK_LINE_OVERHEAD 2
77 
81 #define INFOBLOCK_ICE_LOCK_SIZE 8
82 
86 #define INFOBLOCK_WRITE_LOCK_LINE_SIZE 16
87 
91 #define ICELOCK_UNMODIFIED_VALUE 0xFFFF
92 
96 #define ICELOCK_EVEN_LOCK_VALUE 0xA5A5
97 
101 #define ICELOCK_ODD_LOCK_VALUE 0x5A5A
102 
107 #define INFOBLOCK_MAXIMUM_READ_LENGTH 64
108 
112 #define INFOBLOCK_USN_OFFSET 0x00
113 
118 #define INFOBLOCK_ICE_LOCK_OFFSET 0x30
119 
123 #define INFOBLOCK_ICE_LOCK_MINIMUM 1
124 
128 #define INFOBLOCK_KEY_OFFSET 0x1000
129 
133 #define INFOBLOCK_KEY_SIZE 64
134 
140 #define INFOBLOCK_ENABLE_SIZE (8)
141 
145 #define INFOBLOCK_ENABLE_PATTERN 0x5A5AA5A5
146 
156 typedef enum
157 {
161 } lineformat_e;
162 
172 uint16_t crc15_highbitinput(uint16_t crc15val, uint8_t *input, int bitlength);
173 
181 int infoblock_readraw(uint32_t offset, uint8_t *data);
182 
196 int infoblock_read(uint32_t offset, uint8_t *data, int length);
197 
200 #ifdef __cplusplus
201 }
202 #endif
203 
204 #endif /* _INFOBLOCK_H_ */
205 
lineformat_e
lineformat_e
Three information block line types.
Definition: infoblock.h:156
INFOBLOCK_LINE_FORMAT_USN
@ INFOBLOCK_LINE_FORMAT_USN
Definition: infoblock.h:158
INFOBLOCK_LINE_FORMAT_DESIGN
@ INFOBLOCK_LINE_FORMAT_DESIGN
Definition: infoblock.h:160
crc15_highbitinput
uint16_t crc15_highbitinput(uint16_t crc15val, uint8_t *input, int bitlength)
crc15_highbitinput Calculate CRC15 on data bits
infoblock_readraw
int infoblock_readraw(uint32_t offset, uint8_t *data)
infoblock_readraw Read raw data from information block
INFOBLOCK_LINE_FORMAT_RAW
@ INFOBLOCK_LINE_FORMAT_RAW
Definition: infoblock.h:159
infoblock_read
int infoblock_read(uint32_t offset, uint8_t *data, int length)
infoblock_read Read formatted data from information block