Mistake on this page? Email us
pal_internalFlash.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // Copyright 2016-2019 ARM Ltd.
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // ----------------------------------------------------------------------------
18 
19 #ifndef PAL_FLASH_H
20 #define PAL_FLASH_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 #ifndef _PAL_H
28  #error "Please do not include this file directly, use pal.h instead"
29 #endif
30 
31 
32 
33 #define PAL_INT_FLASH_BLANK_VAL 0xFF
34 
35 
46 
58 
72 palStatus_t pal_internalFlashWrite(const size_t size, const uint32_t address, const uint32_t * buffer);
73 
87 palStatus_t pal_internalFlashRead(const size_t size, const uint32_t address, uint32_t * buffer);
88 
102 palStatus_t pal_internalFlashErase(uint32_t address, size_t size);
103 
104 
109 size_t pal_internalFlashGetPageSize(void);
110 
111 
118 size_t pal_internalFlashGetSectorSize(uint32_t address);
119 
120 
122 //---------------------SOTP functions------------------------//
124 
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 #endif //PAL_FLASH_H
palStatus_t pal_internalFlashDeInit(void)
This function deinitializes the flash API module.
size_t pal_internalFlashGetPageSize(void)
This function returns the minimum writing unit to the flash.
palStatus_t pal_internalFlashErase(uint32_t address, size_t size)
This function Erase the sector.
palStatus_t pal_internalFlashInit(void)
This function initializes the flash API module, and must be called prior to any flash API calls...
palStatus_t pal_internalFlashGetAreaInfo(uint8_t section, palSotpAreaData_t *data)
This function return the SOTP section data.
Definition: pal_types.h:65
palStatus_t pal_internalFlashWrite(const size_t size, const uint32_t address, const uint32_t *buffer)
This function writes to the internal flash.
size_t pal_internalFlashGetSectorSize(uint32_t address)
This function returns the sector size for the given address.
palStatus_t pal_internalFlashRead(const size_t size, const uint32_t address, uint32_t *buffer)
This function copies the memory data into the user-given buffer.
int32_t palStatus_t
Definition: pal_types.h:49