amiro-blt / Target / Source / ARMCM3_STM32 / nvm.h @ 1446566f
History | View | Annotate | Download (3.147 KB)
1 | 69661903 | Thomas Schöpping | /************************************************************************************//** |
---|---|---|---|
2 | * \file Source\ARMCM3_STM32\nvm.h
|
||
3 | * \brief Bootloader non-volatile memory driver header file.
|
||
4 | * \ingroup Target_ARMCM3_STM32
|
||
5 | * \internal
|
||
6 | *----------------------------------------------------------------------------------------
|
||
7 | * C O P Y R I G H T
|
||
8 | *----------------------------------------------------------------------------------------
|
||
9 | * Copyright (c) 2011 by Feaser http://www.feaser.com All rights reserved
|
||
10 | *
|
||
11 | *----------------------------------------------------------------------------------------
|
||
12 | * L I C E N S E
|
||
13 | *----------------------------------------------------------------------------------------
|
||
14 | * This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or
|
||
15 | * modify it under the terms of the GNU General Public License as published by the Free
|
||
16 | * Software Foundation, either version 3 of the License, or (at your option) any later
|
||
17 | * version.
|
||
18 | *
|
||
19 | * OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||
20 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||
21 | * PURPOSE. See the GNU General Public License for more details.
|
||
22 | *
|
||
23 | * You should have received a copy of the GNU General Public License along with OpenBLT.
|
||
24 | * If not, see <http://www.gnu.org/licenses/>.
|
||
25 | *
|
||
26 | * A special exception to the GPL is included to allow you to distribute a combined work
|
||
27 | * that includes OpenBLT without being obliged to provide the source code for any
|
||
28 | * proprietary components. The exception text is included at the bottom of the license
|
||
29 | * file <license.html>.
|
||
30 | *
|
||
31 | * \endinternal
|
||
32 | ****************************************************************************************/
|
||
33 | #ifndef NVM_H
|
||
34 | #define NVM_H
|
||
35 | |||
36 | /****************************************************************************************
|
||
37 | * Include files
|
||
38 | ****************************************************************************************/
|
||
39 | #include "flash.h" /* LPC2xxx flash driver */ |
||
40 | |||
41 | |||
42 | /****************************************************************************************
|
||
43 | * Function prototypes
|
||
44 | ****************************************************************************************/
|
||
45 | void NvmInit(void); |
||
46 | blt_bool NvmWrite(blt_addr addr, blt_int32u len, blt_int8u *data); |
||
47 | blt_bool NvmErase(blt_addr addr, blt_int32u len); |
||
48 | blt_bool NvmVerifyChecksum(void);
|
||
49 | blt_bool NvmDone(void);
|
||
50 | |||
51 | |||
52 | /****************************************************************************************
|
||
53 | * Macro definitions
|
||
54 | ****************************************************************************************/
|
||
55 | /* return codes for hook function NvmWrite/Erase */
|
||
56 | /** \brief Return code for success. */
|
||
57 | #define BLT_NVM_ERROR (0x00) |
||
58 | /** \brief Return code for error. */
|
||
59 | #define BLT_NVM_OKAY (0x01) |
||
60 | /** \brief Return code for not in range. */
|
||
61 | #define BLT_NVM_NOT_IN_RANGE (0x02) |
||
62 | |||
63 | |||
64 | #endif /* NVM_H */ |
||
65 | /*********************************** end of nvm.h **************************************/
|