]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_LM3S811_GCC/hw_include/flash.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / CORTEX_LM3S811_GCC / hw_include / flash.h
1 //*****************************************************************************\r
2 //\r
3 // flash.h - Prototypes for the flash driver.\r
4 //\r
5 // Copyright (c) 2005,2006 Luminary Micro, Inc.  All rights reserved\r
6 //\r
7 // Software License Agreement\r
8 //\r
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and\r
10 // exclusively on LMI's Stellaris Family of microcontroller products.\r
11 //\r
12 // The software is owned by LMI and/or its suppliers, and is protected under\r
13 // applicable copyright laws.  All rights are reserved.  Any use in violation\r
14 // of the foregoing restrictions may subject the user to criminal sanctions\r
15 // under applicable laws, as well as to civil liability for the breach of the\r
16 // terms and conditions of this license.\r
17 //\r
18 // THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED\r
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF\r
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.\r
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR\r
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.\r
23 //\r
24 // This is part of revision 991 of the Stellaris Driver Library.\r
25 //\r
26 //*****************************************************************************\r
27 \r
28 #ifndef __FLASH_H__\r
29 #define __FLASH_H__\r
30 \r
31 #ifdef __cplusplus\r
32 extern "C"\r
33 {\r
34 #endif\r
35 \r
36 //*****************************************************************************\r
37 //\r
38 // Values that can be passed to FlashProtectSet(), and returned by\r
39 // FlashProtectGet().\r
40 //\r
41 //*****************************************************************************\r
42 typedef enum\r
43 {\r
44     FlashReadWrite,                         // Flash can be read and written\r
45     FlashReadOnly,                          // Flash can only be read\r
46     FlashExecuteOnly                        // Flash can only be executed\r
47 }\r
48 tFlashProtection;\r
49 \r
50 //*****************************************************************************\r
51 //\r
52 // Prototypes for the APIs.\r
53 //\r
54 //*****************************************************************************\r
55 extern unsigned long FlashUsecGet(void);\r
56 extern void FlashUsecSet(unsigned long ulClocks);\r
57 extern long FlashErase(unsigned long ulAddress);\r
58 extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress,\r
59                          unsigned long ulCount);\r
60 extern tFlashProtection FlashProtectGet(unsigned long ulAddress);\r
61 extern long FlashProtectSet(unsigned long ulAddress,\r
62                             tFlashProtection eProtect);\r
63 extern long FlashProtectSave(void);\r
64 extern void FlashIntRegister(void (*pfnHandler)(void));\r
65 extern void FlashIntUnregister(void);\r
66 extern void FlashIntEnable(unsigned long ulIntFlags);\r
67 extern void FlashIntDisable(unsigned long ulIntFlags);\r
68 extern unsigned long FlashIntGetStatus(tBoolean bMasked);\r
69 extern void FlashIntClear(unsigned long ulIntFlags);\r
70 \r
71 #ifdef __cplusplus\r
72 }\r
73 #endif\r
74 \r
75 #endif // __FLASH_H__\r