1 /**
2  * @file       flc_common.h
3  * @brief      Common functions for the flash controller driver.
4  * @details    This driver can be used to operate on the embedded flash memory.
5  */
6 
7 /******************************************************************************
8  *
9  * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
10  * Analog Devices, Inc.),
11  * Copyright (C) 2023-2024 Analog Devices, Inc.
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  *     http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  *
25  ******************************************************************************/
26 
27 #ifndef LIBRARIES_PERIPHDRIVERS_SOURCE_FLC_FLC_COMMON_H_
28 #define LIBRARIES_PERIPHDRIVERS_SOURCE_FLC_FLC_COMMON_H_
29 
30 /* **** Includes **** */
31 #include "mxc_sys.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /**
38  * @defgroup flc Flash Controller  (FLC)
39  * @ingroup periphlibs
40  * @{
41  */
42 
43 /***** Definitions *****/
44 
45 /***** Function Prototypes *****/
46 
47 int MXC_FLC_Com_VerifyData(uint32_t address, uint32_t length, uint32_t *data);
48 
49 int MXC_FLC_Com_Write(uint32_t address, uint32_t length, uint32_t *buffer);
50 
51 void MXC_FLC_Com_Read(int address, void *buffer, int len);
52 
53 volatile uint32_t *MXC_FLC_GetWELR(uint32_t address, uint32_t page_num);
54 
55 volatile uint32_t *MXC_FLC_GetRLR(uint32_t address, uint32_t page_num);
56 
57 /**@} end of group flc */
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif // LIBRARIES_PERIPHDRIVERS_SOURCE_FLC_FLC_COMMON_H_
64