📄 csr_1hl.lis
字号:
IF CSR_1_SLIDERS_EXIST
; Local slider variables
003F _CSR_1_bCtrdPos: ; Temp position variable
003F CSR_1_bCtrdPos: BLK 1
0040 _CSR_1_iDenom: ; Temp denominator
0040 CSR_1_iDenom: BLK 2
0042 _CSR_1_iNumer: ; Temp numerator
0042 CSR_1_iNumer: BLK 3
0045 _CSR_1_iMultTempX: ; Temp multiplication register
0045 CSR_1_iMultTempX: BLK 3
0048 _CSR_1_iMultTempY: ; Temp multiplication register
0048 CSR_1_iMultTempY: BLK 3
004B _CSR_1_bCurSlider:
004B CSR_1_bCurSlider: BLK 1
004C _CSR_1_bCurCtrdStartPos: ; Temp current centroid start position
004C CSR_1_bCurCtrdStartPos: BLK 1
004D _CSR_1_bCurCtrdSize: ; Temp current centroid size
004D CSR_1_bCurCtrdSize: BLK 1
004E _CSR_1_bBiggestCtrdStartPos: ; Temp biggest centroid start position
004E CSR_1_bBiggestCtrdStartPos: BLK 1
004F _CSR_1_bBiggestCtrdSize: ; Temp biggest centroid size
004F CSR_1_bBiggestCtrdSize: BLK 1
0050 _CSR_1_iCurPkValue: ; Temp current peak
0050 CSR_1_iCurPkValue: BLK 2
0052 _CSR_1_bCurPkPos: ; Temp current slider pointer
0052 CSR_1_bCurPkPos: BLK 1
0053 _CSR_1_bDiplexInfo: ; Temp flag for diplex of current group
0053 CSR_1_bDiplexInfo: BLK 1
0054 _CSR_1_bDiplexMSB: ; Temp that contains the address of the rom diplex table
0054 CSR_1_bDiplexMSB: BLK 1
0055 _CSR_1_bDiplexLSB:
0055 CSR_1_bDiplexLSB: BLK 1
ENDIF
; Global variables
export _CSR_1_iaSwBaseline
export CSR_1_iaSwBaseline
export _CSR_1_iaSwDiff
export CSR_1_iaSwDiff
export _CSR_1_baBtnFThreshold
export CSR_1_baBtnFThreshold
export _CSR_1_baSwOnMask
export CSR_1_baSwOnMask
export _CSR_1_bBaselineUpdateTimer
export CSR_1_bBaselineUpdateTimer
export _CSR_1_fIsBLValid
export CSR_1_fIsBLValid
IF CSR_1_ESD_DETECTION
; ESD variables
export _CSR_1_iaSwDeriv
export CSR_1_iaSwDeriv
export _CSR_1_iaSwPrevResult
export CSR_1_iaSwPrevResult
export _CSR_1_baESDDebounce
export CSR_1_baESDDebounce
export _CSR_1_baBaselineResetCounter
export CSR_1_baBaselineResetCounter
export _CSR_1_bAbnormalTimer
export CSR_1_bAbnormalTimer
ENDIF
IF CSR_1_SLIDERS_EXIST
; Global slider variables
export _CSR_1_baCtrdStartPos
export CSR_1_baCtrdStartPos
export _CSR_1_baCtrdSize
export CSR_1_baCtrdSize
export _CSR_1_baCtrdPkPos
export CSR_1_baCtrdPkPos
export _CSR_1_iaCtrdPkValue
export CSR_1_iaCtrdPkValue
ENDIF
; Local variables
export _CSR_1_bDivBtwSw
export CSR_1_bDivBtwSw
export _CSR_1_fIsPressed
export CSR_1_fIsPressed
export _CSR_1_bEndOfArray
export CSR_1_bEndOfArray
export _CSR_1_bCurPos
export CSR_1_bCurPos
export _CSR_1_bCurPosMask
export CSR_1_bCurPosMask
export _CSR_1_bSwMaskPtr
export CSR_1_bSwMaskPtr
IF CSR_1_SLIDERS_EXIST
; Local slider variables
export _CSR_1_bCtrdPos
export CSR_1_bCtrdPos
export _CSR_1_iDenom
export CSR_1_iDenom
export _CSR_1_iNumer
export CSR_1_iNumer
export _CSR_1_iMultTempX
export CSR_1_iMultTempX
export _CSR_1_iMultTempY
export CSR_1_iMultTempY
export _CSR_1_bCurCtrdStartPos
export CSR_1_bCurCtrdStartPos
export _CSR_1_bCurCtrdSize
export CSR_1_bCurCtrdSize
export _CSR_1_bBiggestCtrdStartPos
export CSR_1_bBiggestCtrdStartPos
export _CSR_1_bBiggestCtrdSize
export CSR_1_bBiggestCtrdSize
export _CSR_1_iCurPkValue
export CSR_1_iCurPkValue
export _CSR_1_bCurPkPos
export CSR_1_bCurPkPos
export _CSR_1_bDiplexMSB
export CSR_1_bDiplexMSB
export _CSR_1_bDiplexLSB
export CSR_1_bDiplexLSB
ENDIF
;@PSoC_UserCode_INIT@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom declarations below this banner
;---------------------------------------------------
;------------------------
; User Includes
;------------------------
;------------------------
; User Constant Definitions
;------------------------
;------------------------
; User Variable Allocation
;------------------------
;---------------------------------------------------
; Insert your custom declarations above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)
;------------------------
; Constant Definitions
;------------------------
AREA UserModules (ROM, REL, CON)
0001 LSB: equ 1
0000 MSB: equ 0
0000
000A FINGER_THRESHOLD: equ ah
0005 NOISE_THRESHOLD: equ 5h
0010 BASELINE_UPDATE_RATE: equ 10h
0000 ESD_DEBOUNCE: equ 0h
0000
0000 ; The Group Table defines each of the groups of switches or sliders. There
0000 ; is one entry for each slider plus one for the free switches. The first
0000 ; entry is always the free switchs. Each entry is four bytes.
0000
0000 ; The first byte is the index in the Switch Table where the group starts.
0000
0000 ; The second byte is how many switches are in that group. For example, in
0000 ; a system where there are 6 free switches and two sliders, the first with
0000 ; 8 switches and the second with 4, the table would look like the following.
0000 ; db 0, 8
0000 ; db 8, 8
0000 ; db 16, 4
0000 ;
0000 ; The third byte signifies whether the slider is diplexed or not (1 is
0000 ; diplexed, 0 is not diplexed).
0000 ;
0000 ; The fourth byte is the fixed point multiplier that the slider's
0000 ; calculated centroid will be multiplied by to achieve the resolution
0000 ; desired in the CSR wizard. The multiplier is a byte containing the
0000 ; following definition:
0000 ; bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
0000 ; x8 x4 x2 x1 x1/2 x1/4 x1/8 x1/16
0000 ; The formula for the resolution is:
0000 ; Resolution = (SwitchesInSlider - 1) * Multiplier
0000 ; For example, if you had a 10 switch slider and you wanted a
0000 ; resolution of 100, the multiplier would need to be 11 1/8 to get
0000 ; the closest approximation (using sixteenths). Therefore the
0000 ; fixed point value would be 0xb2 (8+2+1+1/8)
0000
0000 ; There are 0x1 groups counting the free switches.
0000 CSR_1_Group_Table:
0000 _CSR_1_Group_Table:
0000 ; Group Table:
0000 ; Origin Count Diplex? SliceMultiplier
0000 00030000 db 0x0, 0x3, 0x0, 0x00 ; Buttons
0004 03080360 db 0x3, 0x8, 0x3, 0x60 ; Slider 1
0008
0008
0008 ; Diplex table data are produced for a group only when the group is a
0008 ; slider and is also diplexed. Otherwise a label is created but no data
0008 ; is placed. The data represents the physical representation of the
0008 ; switches in their location on the PCB. A label containing the pointer
0008 ; to the corresponding table is also produced for referencing in the high-
0008 ; level centroid calculation function.
0008 DiplexTable_0:
0008 ; This group is not a diplexed slider
0008 DiplexTable_1:
0008 00010203040506070003060104070205 db 0,1,2,3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -