⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stm8_tsl_rc_api.ls

📁 STM8全部资料
💻 LS
字号:
   1                     ; C Compiler for STM8 (COSMIC Software)
   2                     ; Parser V4.8.32.1 - 30 Mar 2010
   3                     ; Generator V4.3.4 - 23 Mar 2010
  93                     ; 134 void TSL_Init(void)
  93                     ; 135 {
  95                     	switch	.text
  96  0000               _TSL_Init:
 100                     ; 137   disableInterrupts();
 103  0000 9b            sim
 105                     ; 139   DetectionIntegrator = DETECTION_INTEGRATOR_DEFAULT;
 108  0001 35020009      	mov	_DetectionIntegrator,#2
 109                     ; 140   EndDetectionIntegrator = END_DETECTION_INTEGRATOR_DEFAULT;
 111  0005 35020008      	mov	_EndDetectionIntegrator,#2
 112                     ; 141   ECSTimeStep = ECS_TIME_STEP_DEFAULT;
 114  0009 35140006      	mov	_ECSTimeStep,#20
 115                     ; 142   ECSTemporization = ECS_TEMPO_DEFAULT;
 117  000d 35140005      	mov	_ECSTemporization,#20
 118                     ; 143   RecalibrationIntegrator = RECALIBRATION_INTEGRATOR_DEFAULT;
 120  0011 350a0007      	mov	_RecalibrationIntegrator,#10
 121                     ; 144   DetectionTimeout = DTO_DEFAULT;
 123  0015 725f000a      	clr	_DetectionTimeout
 124                     ; 146   ECS_K_Fast = ECS_IIR_KFAST_DEFAULT;
 126  0019 35140004      	mov	_ECS_K_Fast,#20
 127                     ; 147   ECS_K_Slow = ECS_IIR_KSLOW_DEFAULT;
 129  001d 350a0003      	mov	_ECS_K_Slow,#10
 130                     ; 148   ECSTimeStepCounter = ECSTimeStep;
 132  0021 35140000      	mov	_ECSTimeStepCounter,#20
 133                     ; 149   ECSTempoCounter = 0;
 135  0025 725f0001      	clr	_ECSTempoCounter
 136                     ; 150   ECSTempoPrescaler = 0;
 138  0029 725f0000      	clr	_ECSTempoPrescaler
 139                     ; 152   TSL_IO_Init();
 141  002d cd0000        	call	_TSL_IO_Init
 143                     ; 154   TSL_Timer_Init();
 145  0030 cd0000        	call	_TSL_Timer_Init
 147                     ; 156   TSL_SCKey_Init();
 149  0033 cd0000        	call	_TSL_SCKey_Init
 151                     ; 162   enableInterrupts();
 154  0036 9a            rim
 156                     ; 164   TSLState = TSL_IDLE_STATE;
 159  0037 3501000e      	mov	_TSLState,#1
 160                     ; 166 }
 163  003b 81            	ret
 199                     ; 179 void TSL_Action(void)
 199                     ; 180 {
 200                     	switch	.text
 201  003c               _TSL_Action:
 205                     ; 182   switch ( TSLState )
 207  003c b60e          	ld	a,_TSLState
 209                     ; 292       break;
 210  003e 4a            	dec	a
 211  003f 270c          	jreq	L53
 212  0041 4a            	dec	a
 213  0042 270f          	jreq	L73
 214  0044 4a            	dec	a
 215  0045 2724          	jreq	L14
 216  0047 a008          	sub	a,#8
 217  0049 2733          	jreq	L34
 218  004b               L17:
 220  004b 20fe          	jra	L17
 221  004d               L53:
 222                     ; 185     case TSL_IDLE_STATE:
 222                     ; 186       TSLState = TSL_SCKEY_P1_ACQ_STATE;
 224  004d 3502000e      	mov	_TSLState,#2
 225                     ; 187       break;
 227  0051 203e          	jra	L16
 228  0053               L73:
 229                     ; 190       disableInterrupts();
 232  0053 9b            sim
 234                     ; 191       Local_TickFlag.b.DTO_1sec = TSL_Tick_Flags.b.DTO_1sec;
 237                     	btst		_TSL_Tick_Flags,#0
 238  0059 90110001      	bccm	_Local_TickFlag,#0
 239                     ; 192       TSL_Tick_Flags.b.DTO_1sec = 0;
 241  005d 72110000      	bres	_TSL_Tick_Flags,#0
 242                     ; 193       enableInterrupts();
 245  0061 9a            rim
 247                     ; 195       TSL_SCKEY_P1_Acquisition();
 250  0062 cd0000        	call	_TSL_SCKEY_P1_Acquisition
 252                     ; 196       TSLState = TSL_SCKEY_P1_PROC_STATE;
 254  0065 3503000e      	mov	_TSLState,#3
 255                     ; 197       break;
 257  0069 2026          	jra	L16
 258  006b               L14:
 259                     ; 199     case TSL_SCKEY_P1_PROC_STATE:
 259                     ; 200       for ( KeyIndex = 0; KeyIndex < SCKEY_P1_KEY_COUNT; KeyIndex++ )
 261  006b 3f08          	clr	_KeyIndex
 262  006d               L36:
 263                     ; 202         TSL_SCKey_Process();
 265  006d cd0000        	call	_TSL_SCKey_Process
 267                     ; 200       for ( KeyIndex = 0; KeyIndex < SCKEY_P1_KEY_COUNT; KeyIndex++ )
 269  0070 3c08          	inc	_KeyIndex
 272  0072 b608          	ld	a,_KeyIndex
 273  0074 a103          	cp	a,#3
 274  0076 25f5          	jrult	L36
 275                     ; 211       TSLState = TSL_ECS_STATE;
 277  0078 350b000e      	mov	_TSLState,#11
 278                     ; 214       break;
 280  007c 2013          	jra	L16
 281  007e               L34:
 282                     ; 285     case TSL_ECS_STATE:
 282                     ; 286       TSL_ECS();
 284  007e cd0000        	call	_TSL_ECS
 286                     ; 287       TSL_GlobalSetting.whole = TSL_TempGlobalSetting.whole;
 288  0081 be04          	ldw	x,_TSL_TempGlobalSetting
 289  0083 bf0c          	ldw	_TSL_GlobalSetting,x
 290                     ; 288       TSL_TempGlobalSetting.whole = 0;
 292  0085 5f            	clrw	x
 293  0086 bf04          	ldw	_TSL_TempGlobalSetting,x
 294                     ; 289       TSL_GlobalState.whole = TSL_TempGlobalState.whole;
 296  0088 45030b        	mov	_TSL_GlobalState,_TSL_TempGlobalState
 297                     ; 290       TSL_TempGlobalState.whole = 0;
 299  008b 3f03          	clr	_TSL_TempGlobalState
 300                     ; 291       TSLState = TSL_IDLE_STATE;
 302  008d 3501000e      	mov	_TSLState,#1
 303                     ; 292       break;
 305  0091               L16:
 306                     ; 300 }
 309  0091 81            	ret
1199                     	xref	_TSL_ECS
1200                     	switch	.bss
1201  0000               _ECSTempoPrescaler:
1202  0000 00            	ds.b	1
1203                     	xdef	_ECSTempoPrescaler
1204  0001               _ECSTempoCounter:
1205  0001 00            	ds.b	1
1206                     	xdef	_ECSTempoCounter
1207                     	switch	.ubsct
1208  0000               _ECSTimeStepCounter:
1209  0000 00            	ds.b	1
1210                     	xdef	_ECSTimeStepCounter
1211  0001               _Local_TickFlag:
1212  0001 00            	ds.b	1
1213                     	xdef	_Local_TickFlag
1214  0002               _Local_TickECS10ms:
1215  0002 00            	ds.b	1
1216                     	xdef	_Local_TickECS10ms
1217  0003               _TSL_TempGlobalState:
1218  0003 00            	ds.b	1
1219                     	xdef	_TSL_TempGlobalState
1220  0004               _TSL_TempGlobalSetting:
1221  0004 0000          	ds.b	2
1222                     	xdef	_TSL_TempGlobalSetting
1223  0006               _Delta:
1224  0006 0000          	ds.b	2
1225                     	xdef	_Delta
1226  0008               _KeyIndex:
1227  0008 00            	ds.b	1
1228                     	xdef	_KeyIndex
1229                     	xref	_TSL_IO_Init
1230                     	xref	_TSL_SCKey_Process
1231                     	xref	_TSL_SCKEY_P1_Acquisition
1232                     	xref	_TSL_SCKey_Init
1233                     	xdef	_TSL_Action
1234                     	xdef	_TSL_Init
1235                     	switch	.bss
1236  0002               _IT_Sync_Flags:
1237  0002 00            	ds.b	1
1238                     	xdef	_IT_Sync_Flags
1239  0003               _ECS_K_Slow:
1240  0003 00            	ds.b	1
1241                     	xdef	_ECS_K_Slow
1242  0004               _ECS_K_Fast:
1243  0004 00            	ds.b	1
1244                     	xdef	_ECS_K_Fast
1245  0005               _ECSTemporization:
1246  0005 00            	ds.b	1
1247                     	xdef	_ECSTemporization
1248  0006               _ECSTimeStep:
1249  0006 00            	ds.b	1
1250                     	xdef	_ECSTimeStep
1251  0007               _RecalibrationIntegrator:
1252  0007 00            	ds.b	1
1253                     	xdef	_RecalibrationIntegrator
1254  0008               _EndDetectionIntegrator:
1255  0008 00            	ds.b	1
1256                     	xdef	_EndDetectionIntegrator
1257  0009               _DetectionIntegrator:
1258  0009 00            	ds.b	1
1259                     	xdef	_DetectionIntegrator
1260  000a               _DetectionTimeout:
1261  000a 00            	ds.b	1
1262                     	xdef	_DetectionTimeout
1263  000b               _sSCKeyInfo:
1264  000b 000000000000  	ds.b	45
1265                     	xdef	_sSCKeyInfo
1266                     	switch	.ubsct
1267  0009               _pKeyStruct:
1268  0009 0000          	ds.b	2
1269                     	xdef	_pKeyStruct
1270  000b               _TSL_GlobalState:
1271  000b 00            	ds.b	1
1272                     	xdef	_TSL_GlobalState
1273  000c               _TSL_GlobalSetting:
1274  000c 0000          	ds.b	2
1275                     	xdef	_TSL_GlobalSetting
1276  000e               _TSLState:
1277  000e 00            	ds.b	1
1278                     	xdef	_TSLState
1279                     	xref	_TSL_Timer_Init
1280                     	xref.b	_TSL_Tick_Flags
1300                     	end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -