OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [Common/] [drivers/] [LuminaryMicro/] [lmi_flash.h] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 610 jeremybenn
//*****************************************************************************
2
//
3
// flash.h - Prototypes for the flash driver.
4
//
5
// Copyright (c) 2005-2007 Luminary Micro, Inc.  All rights reserved.
6
// 
7
// Software License Agreement
8
// 
9
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
10
// exclusively on LMI's microcontroller products.
11
// 
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.
17
// 
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.
23
// 
24
// This is part of revision 1582 of the Stellaris Peripheral Driver Library.
25
//
26
//*****************************************************************************
27
 
28
#ifndef __FLASH_H__
29
#define __FLASH_H__
30
 
31
#ifdef __cplusplus
32
extern "C"
33
{
34
#endif
35
 
36
//*****************************************************************************
37
//
38
// Values that can be passed to FlashProtectSet(), and returned by
39
// FlashProtectGet().
40
//
41
//*****************************************************************************
42
typedef enum
43
{
44
    FlashReadWrite,                         // Flash can be read and written
45
    FlashReadOnly,                          // Flash can only be read
46
    FlashExecuteOnly                        // Flash can only be executed
47
}
48
tFlashProtection;
49
 
50
//*****************************************************************************
51
//
52
// Prototypes for the APIs.
53
//
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 long FlashUserGet(unsigned long *pulUser0, unsigned long *pulUser1);
65
extern long FlashUserSet(unsigned long ulUser0, unsigned long ulUser1);
66
extern long FlashUserSave(void);
67
extern void FlashIntRegister(void (*pfnHandler)(void));
68
extern void FlashIntUnregister(void);
69
extern void FlashIntEnable(unsigned long ulIntFlags);
70
extern void FlashIntDisable(unsigned long ulIntFlags);
71
extern unsigned long FlashIntGetStatus(tBoolean bMasked);
72
extern void FlashIntClear(unsigned long ulIntFlags);
73
 
74
#ifdef __cplusplus
75
}
76
#endif
77
 
78
#endif // __FLASH_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.