Subversion Repositories pentevo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1186 savelij 1
		ifndef	__st7spi2inc	; avoid multiple inclusion
2
__st7spi2inc	equ	1
3
 
4
		save
5
		listing	off		; no listing over this file
6
 
7
;****************************************************************************
8
;*                                                                          *
9
;*   AS 1.42 - File SPI.INC                                                 *
10
;*                                                                          *
11
;*   contains SFR and Bit Definitions for ST72xxx SPI                       *
12
;*                                                                          *
13
;****************************************************************************
14
 
15
__defspi	macro	Base
16
SPIDR		label	Base+$00	; Data I/O Register
17
SPICR		label	Base+$01	; Control Register
18
SPIE		bit	SPICR,7		;  Serial peripheral interrupt enable
19
SPE		bit	SPICR,6		;  Serial peripheral output enable
20
SPR2		bit	SPICR,5		;  Divider Enable
21
MSTR		bit	SPICR,4		;  Master
22
CPOL		bit	SPICR,3		;  Clock polarity
23
CPHA		bit	SPICR,2		;  Clock phase
24
SPR1		bit	SPICR,1		;  Serial peripheral rate
25
SPR0		bit	SPICR,0
26
SPICSR		label	Base+$02	; Control/Status Register
27
SPIF		bit	SPICSR,7	;  Serial Peripheral data transfer flag
28
WCOL		bit	SPICSR,6	;  Write Collision status
29
OVR		bit	SPICSR,5	;  Overrun error
30
MODF		bit	SPICSR,4	;  Mode Fault flag
31
SOD		bit	SPICSR,2	;  SPI Output Disable
32
SSM		bit	SPICSR,1	;  /SS Management
33
SSI		bit	SPICSR,0	;  /SS Internal Mode
34
		endm
35
 
36
		restore
37
		endif			; __st7spi2inc