Skip to content

Commit 281c3bf

Browse files
committed
feat(PeriphDrivers): Add MXC_ICC_IsEnabled API
Adds a new ICC API to query ICC status. Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
1 parent b66aa27 commit 281c3bf

31 files changed

Lines changed: 220 additions & 30 deletions

File tree

Libraries/PeriphDrivers/Include/MAX32520/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Check if the instruction cache controller is enabled.
72+
* @retval Returns 1 if enabled, 0 if disabled.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/

Libraries/PeriphDrivers/Include/MAX32570/icc.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,13 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
71+
/**
72+
* @brief Checks if the instruction cache controller is enabled.
73+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
74+
*/
75+
int MXC_ICC_IsEnabled(void);
76+
7077
/**
7178
* @brief Flush the instruction cache controller.
7279
*/

Libraries/PeriphDrivers/Include/MAX32650/icc.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -98,6 +98,13 @@ void MXC_ICC_EnableInst(mxc_icc_regs_t *icc);
9898
*/
9999
void MXC_ICC_DisableInst(mxc_icc_regs_t *icc);
100100

101+
/**
102+
* @brief Checks if one of the ICC's is enabled.
103+
* @param icc Pointer to ICC instance to check.
104+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
105+
*/
106+
int MXC_ICC_IsEnabledInst(mxc_icc_regs_t *icc);
107+
101108
/**
102109
* @brief Flushes data from one of the ICC's.
103110
* @param icc Pointer to ICC instance to flush.

Libraries/PeriphDrivers/Include/MAX32655/icc.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,13 @@ void MXC_ICC_Enable(mxc_icc_regs_t *icc);
6767
*/
6868
void MXC_ICC_Disable(mxc_icc_regs_t *icc);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @param icc Pointer to ICC instance to check.
73+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
74+
*/
75+
int MXC_ICC_IsEnabled(mxc_icc_regs_t *icc);
76+
7077
/**
7178
* @brief Flush the instruction cache controller.
7279
*/

Libraries/PeriphDrivers/Include/MAX32657/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/******************************************************************************
77
*
8-
* Copyright (C) 2024 Analog Devices, Inc.
8+
* Copyright (C) 2024-2026 Analog Devices, Inc.
99
*
1010
* Licensed under the Apache License, Version 2.0 (the "License");
1111
* you may not use this file except in compliance with the License.
@@ -65,6 +65,12 @@ void MXC_ICC_Enable(void);
6565
*/
6666
void MXC_ICC_Disable(void);
6767

68+
/**
69+
* @brief Checks if the instruction cache controller is enabled.
70+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
71+
*/
72+
int MXC_ICC_IsEnabled(void);
73+
6874
/**
6975
* @brief Flush the instruction cache controller.
7076
*/

Libraries/PeriphDrivers/Include/MAX32660/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/

Libraries/PeriphDrivers/Include/MAX32662/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/

Libraries/PeriphDrivers/Include/MAX32665/icc.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -97,6 +97,13 @@ void MXC_ICC_EnableInst(mxc_icc_regs_t *icc);
9797
*/
9898
void MXC_ICC_DisableInst(mxc_icc_regs_t *icc);
9999

100+
/**
101+
* @brief Checks if one of the ICC's is enabled.
102+
* @param icc Pointer to ICC instance to check.
103+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
104+
*/
105+
int MXC_ICC_IsEnabledInst(mxc_icc_regs_t *icc);
106+
100107
/**
101108
* @brief Flushes data from one of the ICC's.
102109
* @param icc Pointer to ICC instance to flush.

Libraries/PeriphDrivers/Include/MAX32670/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/

Libraries/PeriphDrivers/Include/MAX32672/icc.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
99
* Analog Devices, Inc.),
10-
* Copyright (C) 2023-2024 Analog Devices, Inc.
10+
* Copyright (C) 2023-2026 Analog Devices, Inc.
1111
*
1212
* Licensed under the Apache License, Version 2.0 (the "License");
1313
* you may not use this file except in compliance with the License.
@@ -67,6 +67,12 @@ void MXC_ICC_Enable(void);
6767
*/
6868
void MXC_ICC_Disable(void);
6969

70+
/**
71+
* @brief Checks if the instruction cache controller is enabled.
72+
* @retval Returns 1 if the ICC instance is enabled, 0 otherwise.
73+
*/
74+
int MXC_ICC_IsEnabled(void);
75+
7076
/**
7177
* @brief Flush the instruction cache controller.
7278
*/

0 commit comments

Comments
 (0)