Subversion Repositories pentevo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1186 savelij 1
		ifndef	__stm8lflash01inc	; avoid multiple inclusion
2
__stm8lflash01inc	equ	1
3
 
4
		save
5
		listing	off		; no listing over this file
6
 
7
;****************************************************************************
8
;*                                                                          *
9
;*   AS 1.42 - File FLASH01.INC                                             *
10
;*                                                                          *
11
;*   contains SFR and Bit Definitions for STM8Lx01 Flash Controller         *
12
;*                                                                          *
13
;****************************************************************************
14
 
15
__defflash 	macro	Base
16
FLASH_CR1	label	Base+$00	; Flash control register 1
17
IE		bit	FLASH_CR1,1	;  Flash Interrupt enable
18
FIX		bit	FLASH_CR1,0	;  Fixed Byte programming time
19
FLASH_CR2	label	Base+$01	; Flash control register 2
20
OPT		bit	FLASH_CR2,7	;  Write option bytes
21
WPRG		bit	FLASH_CR2,6	;  Word programming
22
ERASE		bit	FLASH_CR2,5	;  Block erasing
23
FPRG		bit	FLASH_CR2,4	;  Fast block programming
24
PRG		bit	FLASH_CR2,0	;  Standard block programming
25
FLASH_PUKR	label	Base+$02	; Flash Program memory unprotection register
26
PUK		bfield	FLASH_IAPSR,0,8	;  Main program memory unlock keys
27
FLASH_DUKR	label	Base+$03	; Data EEPROM unprotection register
28
DUK		bfield	FLASH_DUKR,0,8	;  Data EEPROM write unlock keys
29
FLASH_IAPSR	label	Base+$04	; Flash in-application programming status register
30
DUL		bit	FLASH_IAPSR,3	;  Data EEPROM area unlocked flag
31
EOP		bit	FLASH_IAPSR,2	;  End of programming (write or erase operation) flag
32
PUL		bit	FLASH_IAPSR,1	;  Flash Program memory unlocked flag
33
WR_PG_DIS	bit	FLASH_IAPSR,0	;  Write attempted to protected page flag
34
		endm
35
 
36
		restore
37
		endif			; __stm8lflash01inc