Revert "headerfile/makefile hax hax"
[pyfrprog.git] / Flash.h
1 /*****************************************************************************/
2 /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
3 /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
4 /* ELIGIBILITY FOR ANY PURPOSES.                                             */
5 /*                 (C) Fujitsu Microelectronics Europe GmbH                  */
6 /*****************************************************************************/
7
8 #ifndef __FLASH_H__
9 #define __FLASH_H__
10
11 #include "MB91465K.H"
12
13 #define hseq_1 ((volatile unsigned short int *)0x000A1557)
14 #define hseq_2 ((volatile unsigned short int *)0x000A0AAF)
15
16
17 #define DPOLL 0x0080
18 #define TLOVER 0x0020
19 #define SETIMR 0x0008
20
21 void FLASH_PrepareWriteHalfWordMode();
22 void FLASH_PrepareReadMode();
23 unsigned char FLASH_WriteHalfWord(unsigned int adr, unsigned short int data);
24 unsigned char FLASH_SectorErase(unsigned int sec_adr);
25 unsigned char FLASH_ChipErase(void);
26 unsigned char FLASH_SectorBlankCheck(unsigned int secaddr, unsigned int size);
27 unsigned char FLASH_ReadReset(void);
28 unsigned char FLASH_SuspendSectorErase(unsigned int secaddr);
29 unsigned char FLASH_ResumeSectorErase(unsigned int secaddr);
30 unsigned int FLASH_SaveDisableInterruptFlag(void);
31 void FLASH_RestoreInterruptFlag(unsigned int flag);
32 unsigned char FLASH_CheckPendingInterrupt(void);
33
34 #endif  /* __FLASH_H__  */