1 /******************************************************************************
2  *
3  * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
4  * Analog Devices, Inc.),
5  * Copyright (C) 2023-2024 Analog Devices, Inc.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************************/
20 
21 #ifndef LIBRARIES_PERIPHDRIVERS_SOURCE_OTP_OTP_REVA_H_
22 #define LIBRARIES_PERIPHDRIVERS_SOURCE_OTP_OTP_REVA_H_
23 
24 /* **** Includes **** */
25 #include <stdint.h>
26 #include "otp_reva_regs.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 /* **** Function Prototypes **** */
33 
34 int MXC_OTP_RevA_Init(mxc_otp_reva_regs_t *otp, mxc_otp_clkdiv_t pclkdiv);
35 
36 int MXC_OTP_RevA_IsLocked(mxc_otp_reva_regs_t *otp);
37 
38 void MXC_OTP_RevA_Unlock(mxc_otp_reva_regs_t *otp);
39 
40 void MXC_OTP_RevA_Lock(mxc_otp_reva_regs_t *otp);
41 
42 int MXC_OTP_RevA_Write(mxc_otp_reva_regs_t *otp, uint16_t addr, uint32_t *data, uint16_t size);
43 
44 int MXC_OTP_RevA_Write32(mxc_otp_reva_regs_t *otp, uint16_t addr, uint32_t data);
45 
46 int MXC_OTP_RevA_Read(mxc_otp_reva_regs_t *otp, uint16_t addr, uint32_t *data, uint16_t size);
47 
48 int MXC_OTP_RevA_Read32(mxc_otp_reva_regs_t *otp, uint16_t addr, uint32_t *data);
49 
50 /**@} end of group otp */
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif //LIBRARIES_PERIPHDRIVERS_SOURCE_OTP_OTP_REVA_H_
57