1 //*****************************************************************************
3 // flash.h - Prototypes for the flash driver.
5 // Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved
7 // Software License Agreement
9 // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10 // exclusively on LMI's Stellaris Family of microcontroller products.
12 // The software is owned by LMI and/or its suppliers, and is protected under
13 // applicable copyright laws. All rights are reserved. Any use in violation
14 // of the foregoing restrictions may subject the user to criminal sanctions
15 // under applicable laws, as well as to civil liability for the breach of the
16 // terms and conditions of this license.
18 // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19 // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21 // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
22 // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
24 // This is part of revision 991 of the Stellaris Driver Library.
26 //*****************************************************************************
36 //*****************************************************************************
38 // Values that can be passed to FlashProtectSet(), and returned by
41 //*****************************************************************************
44 FlashReadWrite, // Flash can be read and written
45 FlashReadOnly, // Flash can only be read
46 FlashExecuteOnly // Flash can only be executed
50 //*****************************************************************************
52 // Prototypes for the APIs.
54 //*****************************************************************************
55 extern unsigned long FlashUsecGet(void);
56 extern void FlashUsecSet(unsigned long ulClocks);
57 extern long FlashErase(unsigned long ulAddress);
58 extern long FlashProgram(unsigned long *pulData, unsigned long ulAddress,
59 unsigned long ulCount);
60 extern tFlashProtection FlashProtectGet(unsigned long ulAddress);
61 extern long FlashProtectSet(unsigned long ulAddress,
62 tFlashProtection eProtect);
63 extern long FlashProtectSave(void);
64 extern void FlashIntRegister(void (*pfnHandler)(void));
65 extern void FlashIntUnregister(void);
66 extern void FlashIntEnable(unsigned long ulIntFlags);
67 extern void FlashIntDisable(unsigned long ulIntFlags);
68 extern unsigned long FlashIntGetStatus(tBoolean bMasked);
69 extern void FlashIntClear(unsigned long ulIntFlags);