Mistake on this page? Email us
pal_plat_internalFlash.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright 2016, 2017 ARM Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *******************************************************************************/
16 #ifndef PAL_PLAT_FLASH_H_
17 #define PAL_PLAT_FLASH_H_
18 
19 #include "pal_internalFlash.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
36 
48 
61 palStatus_t pal_plat_internalFlashWrite(const size_t size, const uint32_t address, const uint32_t * buffer);
62 
75 palStatus_t pal_plat_internalFlashRead(const size_t size, const uint32_t address, uint32_t * buffer);
76 
90 palStatus_t pal_plat_internalFlashErase(uint32_t address, size_t size);
91 
97 
98 
105 size_t pal_plat_internalFlashGetSectorSize(uint32_t address);
106 
107 
108 
112 
122 
123 
124 #ifdef __cplusplus
125 }
126 #endif
127 
128 #endif /* PAL_PLAT_FLASH_H_ */
palStatus_t pal_plat_internalFlashDeInit(void)
This function deinitializes the flash module.
palStatus_t pal_plat_internalFlashWrite(const size_t size, const uint32_t address, const uint32_t *buffer)
This function writes to the internal flash.
size_t pal_plat_internalFlashGetSectorSize(uint32_t address)
This function returns the sector size.
palStatus_t pal_plat_internalFlashErase(uint32_t address, size_t size)
This function erases a sector.
Definition: pal_types.h:71
palStatus_t pal_plat_internalFlashRead(const size_t size, const uint32_t address, uint32_t *buffer)
This function copies the memory data into the user given buffer.
palStatus_t pal_plat_internalFlashGetAreaInfo(uint8_t section, palSotpAreaData_t *data)
This function return the SOTP section data.
size_t pal_plat_internalFlashGetPageSize(void)
This function returns the minimum size of the writing unit when writing to the flash.
int32_t palStatus_t
Definition: pal_types.h:55
palStatus_t pal_plat_internalFlashInit(void)
This function initialized the flash API module, And should be called prior to flash API calls...