1 //*****************************************************************************
\r
3 // flash.h - Prototypes for the flash driver.
\r
5 // Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved
\r
7 // Software License Agreement
\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
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
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
24 // This is part of revision 635 of the Stellaris Driver Library.
\r
26 //*****************************************************************************
\r
36 //*****************************************************************************
\r
38 // Values that can be passed to FlashProtectSet(), and returned by
\r
39 // FlashProtectGet().
\r
41 //*****************************************************************************
\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
50 //*****************************************************************************
\r
52 // Prototypes for the APIs.
\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
75 #endif // __FLASH_H__
\r