?? rtxconf.a51
字號:
PCON DATA 87H
ENTER_IDLE MACRO
;;
;; Enter Idle Mode
;; ---------------
;; To be used whenever entering idle state.
;;
ORL PCON, #01H ; Set idle mode (leave by interrupt)
ORL PCON, #20H ; (peripherals stay active)
ENDM
ELSEIF (?RTX_CPU_TYPE = 5)
;**********
;* Type 5 *
;**********
;------------------------------------------------------------------
; Define the number and addresses of the interrupt enable registers
; 8051F -> 1 interrupt enable register
; (Set the not used registers to the same address as ?RTX_IE)
INT_EN_MASK_NUMBER EQU 1
?RTX_IE DATA 0A8H
?RTX_IEN1 DATA 0A8H ; not used
?RTX_IEN2 DATA 0A8H ; not used
;------------------------------------------------------------------
; Generate the interrupt entry points supported by the peripherals
; of the selected CPU type.
IF (?RTX_SYSTEM_TIMER = 0)
; Do NOT include the Timer 0 Vector (INT-1)
INT_ENTRY 0
INT_ENTRY 2
INT_ENTRY 3
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
ELSEIF (?RTX_SYSTEM_TIMER = 1)
; Do NOT include the Timer 1 Vector (INT-3)
INT_ENTRY 0
INT_ENTRY 1
INT_ENTRY 2
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
ELSEIF (?RTX_SYSTEM_TIMER = 2)
; Do NOT include the Timer 2 Vector (INT-5)
INT_ENTRY 0
INT_ENTRY 1
INT_ENTRY 2
INT_ENTRY 3
INT_ENTRY 4
INT_ENTRY 6
ENDIF
;------------------------------------------------------------------
; The following table attaches the interrupt numbers (0..31) to the
; corresponding bits in the interrupt enable masks of the specific
; processor.
; All three interrupt enable register contents must be defined
; for every interrupt number (even when the specific processor contains
; only one interrupt mask).
; Syntax: DB IE-content, IE1-content, IE2-content
;
?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF SEGMENT CODE
RSEG ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF
?RTX_INT_TO_BIT_TABLE_BASE:
DB 01H, 00H, 00H ; INT_0 (INT0)
DB 02H, 00H, 00H ; INT_1 (Timer 0)
DB 04H, 00H, 00H ; INT_2 (INT1)
DB 08H, 00H, 00H ; INT_3 (Timer 1)
DB 10H, 00H, 00H ; INT_4 (Ser. channel)
DB 20H, 00H, 00H ; INT_5 (Timer 2)
DB 40H, 00H, 00H ; INT_6 (PCA)
;------------------------------------------------------------------
; Define the greatest supported interrupt number
?RTX_MAX_INT_NBR EQU 6
PCON DATA 87H
ENTER_IDLE MACRO
;;
;; Enter Idle Mode
;; ---------------
;; Not supported by all 8051 type processors (see manufacturer's
;; data sheet !)
;; To be used whenever entering idle state.
;;
ORL PCON, #01H ; Set idle mode (leave by interrupt)
; (peripherals stay active)
ENDM
ELSEIF (?RTX_CPU_TYPE = 6) OR (?RTX_CPU_TYPE = 7)
;*****************
;* Type 6 and 7 *
;*****************
;------------------------------------------------------------------
; Define the number and addresses of the interrupt enable registers
; 80552 -> 2 interrupt enable registers
; (Set the not used registers to the same address as ?RTX_IE)
INT_EN_MASK_NUMBER EQU 2
?RTX_IE DATA 0A8H
?RTX_IEN1 DATA 0E8H
?RTX_IEN2 DATA 0A8H ; not used
;------------------------------------------------------------------
; Generate the interrupt entry points supported by the peripherals
; of the selected CPU type.
IF (?RTX_SYSTEM_TIMER = 0)
; Do NOT include the Timer 0 Vector (INT-1)
INT_ENTRY 0
INT_ENTRY 2
INT_ENTRY 3
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
INT_ENTRY 7
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
INT_ENTRY 11
INT_ENTRY 12
INT_ENTRY 13
INT_ENTRY 14
ELSEIF (?RTX_SYSTEM_TIMER = 1)
; Do NOT include the Timer 1 Vector (INT-3)
INT_ENTRY 0
INT_ENTRY 1
INT_ENTRY 2
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
INT_ENTRY 7
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
INT_ENTRY 11
INT_ENTRY 12
INT_ENTRY 13
INT_ENTRY 14
ENDIF
;------------------------------------------------------------------
; The following table attaches the interrupt numbers (0..31) to the
; corresponding bits in the interrupt enable masks of the specific
; processor.
; All three interrupt enable register contents must be defined
; for every interrupt number (even when the specific processor contains
; only one interrupt mask).
; Syntax: DB IE-content, IE1-content, IE2-content
;
?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF SEGMENT CODE
RSEG ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF
?RTX_INT_TO_BIT_TABLE_BASE:
DB 01H, 00H, 00H ; INT_0 (INT0)
DB 02H, 00H, 00H ; INT_1 (Timer 0)
DB 04H, 00H, 00H ; INT_2 (INT1)
DB 08H, 00H, 00H ; INT_3 (Timer 1)
DB 10H, 00H, 00H ; INT_4 (Serial 0)
DB 20H, 00H, 00H ; INT_5 (I2C / CAN)
DB 00H, 01H, 00H ; INT_6 (Timer 2 Capture 0)
DB 00H, 02H, 00H ; INT_7 (Timer 2 Capture 1)
DB 00H, 04H, 00H ; INT_8 (Timer 2 Capture 2)
DB 00H, 08H, 00H ; INT_9 (Timer 2 Capture 3)
DB 40H, 00H, 00H ; INT_10 (A/D-Converter)
DB 00H, 10H, 00H ; INT_11 (Timer 2 Cpmpare 0)
DB 00H, 20H, 00H ; INT_12 (Timer 2 Compare 1)
DB 00H, 40H, 00H ; INT_13 (Timer 2 Compare 2)
DB 00H, 80H, 00H ; INT_14 (Timer 2 overflow)
;------------------------------------------------------------------
; Define the greatest supported interrupt number
?RTX_MAX_INT_NBR EQU 14
PCON DATA 87H
ENTER_IDLE MACRO
;;
;; Enter Idle Mode
;; ---------------
;; Not supported by all 8051 type processors (see manufacturer's
;; data sheet !)
;; To be used whenever entering idle state.
;;
ORL PCON, #01H ; Set idle mode (leave by interrupt)
; (peripherals stay active)
ENDM
ELSEIF (?RTX_CPU_TYPE = 8)
;**********
;* Type 8 *
;**********
;------------------------------------------------------------------
; Define the number and addresses of the interrupt enable registers
; 80152 -> 2 interrupt enable registers
; (Set the not used registers to the same address as ?RTX_IE)
INT_EN_MASK_NUMBER EQU 2
?RTX_IE DATA 0A8H
?RTX_IEN1 DATA 0C8H
?RTX_IEN2 DATA 0A8H ; not used
;------------------------------------------------------------------
; Generate the interrupt entry points supported by the peripherals
; of the selected CPU type.
IF (?RTX_SYSTEM_TIMER = 0)
; Do NOT include the Timer 0 Vector (INT-1)
INT_ENTRY 0
INT_ENTRY 2
INT_ENTRY 3
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
INT_ENTRY 7
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
ELSEIF (?RTX_SYSTEM_TIMER = 1)
; Do NOT include the Timer 1 Vector (INT-3)
INT_ENTRY 0
INT_ENTRY 1
INT_ENTRY 2
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 6
INT_ENTRY 7
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
ENDIF
;------------------------------------------------------------------
; The following table attaches the interrupt numbers (0..31) to the
; corresponding bits in the interrupt enable masks of the specific
; processor.
; All three interrupt enable register contents must be defined
; for every interrupt number (even when the specific processor contains
; only one interrupt mask).
; Syntax: DB IE-content, IE1-content, IE2-content
;
?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF SEGMENT CODE
RSEG ?RTX?RTX_INT_TO_BIT_TABLE?RTXCONF
?RTX_INT_TO_BIT_TABLE_BASE:
DB 01H, 00H, 00H ; INT_0 (P3.2/INT0)
DB 02H, 00H, 00H ; INT_1 (Timer 0)
DB 04H, 00H, 00H ; INT_2 (P3.3/INT1)
DB 08H, 00H, 00H ; INT_3 (Timer 1)
DB 10H, 00H, 00H ; INT_4 (Ser. channel)
DB 00H, 01H, 00H ; INT_5 (GSC receive valid)
DB 00H, 02H, 00H ; INT_6 (GSC receive error)
DB 00H, 04H, 00H ; INT_7 (DMA request 0)
DB 00H, 08H, 00H ; INT_8 (GSC transmit valid)
DB 00H, 20H, 00H ; INT_9 (GSC transmit error)
DB 00H, 10H, 00H ; INT_10 (DMA request 1)
;------------------------------------------------------------------
; Define the greatest supported interrupt number
?RTX_MAX_INT_NBR EQU 10
PCON DATA 87H
ENTER_IDLE MACRO
;;
;; Enter Idle Mode
;; ---------------
;; Not supported by all 8051 type processors (see manufacturer's
;; data sheet !)
;; To be used whenever entering idle state.
;;
ORL PCON, #01H ; Set idle mode (leave by interrupt)
; (peripherals stay active)
ENDM
ELSEIF (?RTX_CPU_TYPE = 9)
;**********
;* Type 9 *
;**********
;------------------------------------------------------------------
; Define the number and addresses of the interrupt enable registers
; 80517A -> 3 interrupt enable registers
; (Set the not used registers to the same address as ?RTX_IE)
INT_EN_MASK_NUMBER EQU 3
?RTX_IE DATA 0A8H
?RTX_IEN1 DATA 0B8H
?RTX_IEN2 DATA 09AH
;------------------------------------------------------------------
; Generate the interrupt entry points supported by the peripherals
; of the selected CPU type.
IF (?RTX_SYSTEM_TIMER = 0)
; Do NOT include the Timer 0 Vector (INT-1)
INT_ENTRY 0
INT_ENTRY 2
INT_ENTRY 3
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
INT_ENTRY 11
INT_ENTRY 12
INT_ENTRY 13
INT_ENTRY 16
INT_ENTRY 18
INT_ENTRY 19
INT_ENTRY 20
INT_ENTRY 21
ELSEIF (?RTX_SYSTEM_TIMER = 1)
; Do NOT include the Timer 1 Vector (INT-3)
INT_ENTRY 0
INT_ENTRY 1
INT_ENTRY 2
INT_ENTRY 4
INT_ENTRY 5
INT_ENTRY 8
INT_ENTRY 9
INT_ENTRY 10
INT_ENTRY 11
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -