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 /* **** Includes **** */
22 #include <string.h>
23 #include <stdio.h>
24 #include "mxc_device.h"
25 #include "mxc_assert.h"
26 #include "mxc_sys.h"
27 #include "simo_reva.h"
28
29 /* **** Functions **** */
MXC_SIMO_SetVregO_A(uint32_t voltage)30 void MXC_SIMO_SetVregO_A(uint32_t voltage)
31 {
32 MXC_SIMO_RevA_SetVregO_A((mxc_simo_reva_regs_t *)MXC_SIMO, voltage);
33 }
34
MXC_SIMO_SetVregO_B(uint32_t voltage)35 void MXC_SIMO_SetVregO_B(uint32_t voltage)
36 {
37 MXC_SIMO_RevA_SetVregO_B((mxc_simo_reva_regs_t *)MXC_SIMO, voltage);
38 }
39
MXC_SIMO_SetVregO_C(uint32_t voltage)40 void MXC_SIMO_SetVregO_C(uint32_t voltage)
41 {
42 MXC_SIMO_RevA_SetVregO_C((mxc_simo_reva_regs_t *)MXC_SIMO, voltage);
43 }
44
MXC_SIMO_SetVregO_D(uint32_t voltage)45 void MXC_SIMO_SetVregO_D(uint32_t voltage)
46 {
47 MXC_SIMO_RevA_SetVregO_D((mxc_simo_reva_regs_t *)MXC_SIMO, voltage);
48 }
49
50 // void MXC_SIMO_setIpkA(uint32_t peak_current)
51 // {
52 // MXC_SIMO_RevA_setIpkA(peak_current);
53 // }
54
55 // void MXC_SIMO_setIpkB(uint32_t peak_current)
56 // {
57 // MXC_SIMO_RevA_setIpkB(peak_current);
58 // }
59
60 // void MXC_SIMO_setIpkC(uint32_t peak_current)
61 // {
62 // MXC_SIMO_RevA_setIpkC(peak_current);
63 // }
64
65 // void MXC_SIMO_setIpkD(uint32_t peak_current)
66 // {
67 // MXC_SIMO_RevA_setIpkD(peak_current);
68 // }
69
70 // void MXC_SIMO_setMaxTon(uint32_t ontime)
71 // {
72 // MXC_SIMO_RevA_setMaxTon(ontime);
73 // }
74
75 // void MXC_SIMO_setAlertThresholdA(uint32_t threshold)
76 // {
77 // MXC_SIMO_RevA_setAlertThresholdA(threshold);
78 // }
79
80 // void MXC_SIMO_setAlertThresholdB(uint32_t threshold)
81 // {
82 // MXC_SIMO_RevA_setAlertThresholdB(threshold);
83 // }
84
85 // void MXC_SIMO_setAlertThresholdC(uint32_t threshold)
86 // {
87 // MXC_SIMO_RevA_setAlertThresholdC(threshold);
88 // }
89
90 // void MXC_SIMO_setAlertThresholdD(uint32_t threshold)
91 // {
92 // MXC_SIMO_RevA_setAlertThresholdD(threshold);
93 // }
94
95 // void MXC_SIMO_setZeroCrossCalA(uint32_t zerocross)
96 // {
97 // MXC_SIMO_RevA_setZeroCrossCalA(zerocross);
98 // }
99
100 // void MXC_SIMO_setZeroCrossCalB(uint32_t zerocross)
101 // {
102 // MXC_SIMO_RevA_setZeroCrossCalB(zerocross);
103 // }
104
105 // void MXC_SIMO_setZeroCrossCalC(uint32_t zerocross)
106 // {
107 // MXC_SIMO_RevA_setZeroCrossCalC(zerocross);
108 // }
109
110 // void MXC_SIMO_setZeroCrossCalD(uint32_t zerocross)
111 // {
112 // MXC_SIMO_RevA_setZeroCrossCalD(zerocross);
113 // }
114
MXC_SIMO_GetOutReadyA(void)115 uint32_t MXC_SIMO_GetOutReadyA(void)
116 {
117 return MXC_SIMO_RevA_GetOutReadyA((mxc_simo_reva_regs_t *)MXC_SIMO);
118 }
119
MXC_SIMO_GetOutReadyB(void)120 uint32_t MXC_SIMO_GetOutReadyB(void)
121 {
122 return MXC_SIMO_RevA_GetOutReadyB((mxc_simo_reva_regs_t *)MXC_SIMO);
123 }
124
MXC_SIMO_GetOutReadyC(void)125 uint32_t MXC_SIMO_GetOutReadyC(void)
126 {
127 return MXC_SIMO_RevA_GetOutReadyC((mxc_simo_reva_regs_t *)MXC_SIMO);
128 }
129
MXC_SIMO_GetOutReadyD(void)130 uint32_t MXC_SIMO_GetOutReadyD(void)
131 {
132 return MXC_SIMO_RevA_GetOutReadyD((mxc_simo_reva_regs_t *)MXC_SIMO);
133 }
134