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

📄 vdev_ios.ls

📁 STM8S105 BLDC源代码
💻 LS
字号:
   1                     ; C Compiler for STM8 (COSMIC Software)
   2                     ; Parser V4.9.10 - 10 Feb 2011
   3                     ; Generator (Limited) V4.3.6 - 15 Feb 2011
   4                     ; Optimizer V4.3.5 - 15 Feb 2011
  78                     .const:	section	.text
  79  0000               L6:
  80  0000 00000001      	dc.l	1
  81                     ; 35 errorcode vdev_fninp8(u32 addr, pu8 pportvalue)
  81                     ; 36 {
  82                     	scross	off
  83                     	switch	.text
  84  0000               _vdev_fninp8:
  86  0000 88            	push	a
  87       00000001      OFST:	set	1
  90                     ; 37 	errorcode ret = VDEV_ERROR_NONE;
  92  0001 0f01          	clr	(OFST+0,sp)
  93                     ; 39 	switch (addr)
  95  0003 96            	ldw	x,sp
  96  0004 1c0004        	addw	x,#OFST+3
  97  0007 cd0000        	call	c_ltor
  99  000a ae0000        	ldw	x,#L6
 100  000d cd0000        	call	c_lcmp
 102  0010 2618          	jrne	L34
 105                     ; 41 		case VDEV_INP8_USER_INPUT:
 105                     ; 42 			*pportvalue = 0;
 107  0012 1e08          	ldw	x,(OFST+7,sp)
 108                     ; 51 				*pportvalue |= (u8)((u8)(!GPIO_ReadInputPin(USER_BUTTON_PORT, USER_BUTTON_BIT)) << USER_INPUT_KEY);
 110  0014 4b40          	push	#64
 111  0016 7f            	clr	(x)
 112  0017 ae500f        	ldw	x,#20495
 113  001a cd0000        	call	_GPIO_ReadInputPin
 115  001d 5b01          	addw	sp,#1
 116  001f 4d            	tnz	a
 117  0020 2603          	jrne	L01
 118  0022 4c            	inc	a
 119  0023 2001          	jra	L41
 120  0025               L01:
 121  0025 4f            	clr	a
 122  0026               L41:
 123  0026 1e08          	ldw	x,(OFST+7,sp)
 124  0028 fa            	or	a,(x)
 125  0029 f7            	ld	(x),a
 126                     ; 53 		break;
 128  002a               L34:
 129                     ; 55 	return ret;
 131  002a 7b01          	ld	a,(OFST+0,sp)
 134  002c 5b01          	addw	sp,#1
 135  002e 81            	ret	
 178                     ; 58 errorcode vdev_fninp16(u32 addr, pu16 pportvalue)
 178                     ; 59 {
 179                     	switch	.text
 180  002f               _vdev_fninp16:
 182  002f 88            	push	a
 183       00000001      OFST:	set	1
 186                     ; 60 	errorcode ret = VDEV_ERROR_NONE;
 188                     ; 62 	return ret;
 190  0030 4f            	clr	a
 193  0031 5b01          	addw	sp,#1
 194  0033 81            	ret	
 237                     ; 65 errorcode vdev_fninp32(u32 addr, pu32 pportvalue)
 237                     ; 66 {
 238                     	switch	.text
 239  0034               _vdev_fninp32:
 241  0034 88            	push	a
 242       00000001      OFST:	set	1
 245                     ; 67 	errorcode ret = VDEV_ERROR_NONE;
 247                     ; 69 	return ret;
 249  0035 4f            	clr	a
 252  0036 5b01          	addw	sp,#1
 253  0038 81            	ret	
 305                     	switch	.const
 306  0004               L302:
 307  0004 0004          	dc.w	4
 308  0006 00000004      	dc.l	4
 309  000a 004b          	dc.w	L511
 310  000c 00000005      	dc.l	5
 311  0010 006a          	dc.w	L521
 312  0012 00000006      	dc.l	6
 313  0016 0089          	dc.w	L531
 314  0018 00000007      	dc.l	7
 315  001c 00a8          	dc.w	L541
 316  001e 00c8          	dc.w	L502
 317                     ; 72 errorcode vdev_fnout8(u32 addr, u8 pportvalue)
 317                     ; 73 {
 318                     	switch	.text
 319  0039               _vdev_fnout8:
 321  0039 88            	push	a
 322       00000001      OFST:	set	1
 325                     ; 74 	errorcode ret = VDEV_ERROR_NONE;
 327  003a 0f01          	clr	(OFST+0,sp)
 328                     ; 76 	switch (addr)
 330  003c 96            	ldw	x,sp
 331  003d 1c0004        	addw	x,#OFST+3
 332  0040 cd0000        	call	c_ltor
 335  0043 ae0004        	ldw	x,#L302
 336  0046 cd0000        	call	c_jltab
 337                     ; 78 		case VDEV_OUT8_DISPLAY_FLUSH:
 337                     ; 79 			#ifdef DISPLAY
 337                     ; 80 				// Display flush
 337                     ; 81 				dev_displayFlush();
 337                     ; 82 			#endif
 337                     ; 83 		break;
 339  0049 207d          	jra	L502
 340                     ; 85 		case VDEV_OUT8_DISPLAY_PRINTCH:
 340                     ; 86 			#ifdef DISPLAY
 340                     ; 87 				// Display printch
 340                     ; 88 				dev_displayPrintch();
 340                     ; 89 			#endif
 340                     ; 90 		break;
 342  004b               L511:
 343                     ; 92 		case VDEV_OUT8_LED_1:
 343                     ; 93 			switch (pportvalue)
 345  004b 7b08          	ld	a,(OFST+7,sp)
 347                     ; 103 				break;
 348  004d 2708          	jreq	L711
 349  004f 4a            	dec	a
 350  0050 270b          	jreq	L121
 351  0052 4a            	dec	a
 352  0053 270e          	jreq	L321
 353  0055 2071          	jra	L502
 354  0057               L711:
 355                     ; 95 				case LED_ON:
 355                     ; 96 					DEBUG0_PORT->ODR |= DEBUG0_PIN;
 357  0057 72105023      	bset	20515,#0
 358                     ; 97 				break;
 360  005b 206b          	jra	L502
 361  005d               L121:
 362                     ; 98 				case LED_OFF:
 362                     ; 99 					DEBUG0_PORT->ODR &= (u8)(~DEBUG0_PIN);
 364  005d 72115023      	bres	20515,#0
 365                     ; 100 				break;
 367  0061 2065          	jra	L502
 368  0063               L321:
 369                     ; 101 				case LED_TOGGLE:
 369                     ; 102 					DEBUG0_PORT->ODR ^= DEBUG0_PIN;
 371  0063 c65023        	ld	a,20515
 372  0066 a801          	xor	a,#1
 373                     ; 103 				break;
 375  0068 205b          	jp	LC001
 376                     ; 105 		break;
 378  006a               L521:
 379                     ; 107 		case VDEV_OUT8_LED_2:
 379                     ; 108 			switch (pportvalue)
 381  006a 7b08          	ld	a,(OFST+7,sp)
 383                     ; 118 				break;
 384  006c 2708          	jreq	L721
 385  006e 4a            	dec	a
 386  006f 270b          	jreq	L131
 387  0071 4a            	dec	a
 388  0072 270e          	jreq	L331
 389  0074 2052          	jra	L502
 390  0076               L721:
 391                     ; 110 				case LED_ON:
 391                     ; 111 					DEBUG1_PORT->ODR |= DEBUG1_PIN;
 393  0076 72125023      	bset	20515,#1
 394                     ; 112 				break;
 396  007a 204c          	jra	L502
 397  007c               L131:
 398                     ; 113 				case LED_OFF:
 398                     ; 114 					DEBUG1_PORT->ODR &= (u8)(~DEBUG1_PIN);
 400  007c 72135023      	bres	20515,#1
 401                     ; 115 				break;
 403  0080 2046          	jra	L502
 404  0082               L331:
 405                     ; 116 				case LED_TOGGLE:
 405                     ; 117 					DEBUG1_PORT->ODR ^= DEBUG1_PIN;
 407  0082 c65023        	ld	a,20515
 408  0085 a802          	xor	a,#2
 409                     ; 118 				break;
 411  0087 203c          	jp	LC001
 412                     ; 120 		break;
 414  0089               L531:
 415                     ; 122 		case VDEV_OUT8_LED_3:
 415                     ; 123 			switch (pportvalue)
 417  0089 7b08          	ld	a,(OFST+7,sp)
 419                     ; 133 				break;
 420  008b 2708          	jreq	L731
 421  008d 4a            	dec	a
 422  008e 270b          	jreq	L141
 423  0090 4a            	dec	a
 424  0091 270e          	jreq	L341
 425  0093 2033          	jra	L502
 426  0095               L731:
 427                     ; 125 				case LED_ON:
 427                     ; 126 					DEBUG2_PORT->ODR |= DEBUG2_PIN;
 429  0095 72145023      	bset	20515,#2
 430                     ; 127 				break;
 432  0099 202d          	jra	L502
 433  009b               L141:
 434                     ; 128 				case LED_OFF:
 434                     ; 129 					DEBUG2_PORT->ODR &= (u8)(~DEBUG2_PIN);
 436  009b 72155023      	bres	20515,#2
 437                     ; 130 				break;
 439  009f 2027          	jra	L502
 440  00a1               L341:
 441                     ; 131 				case LED_TOGGLE:
 441                     ; 132 					DEBUG2_PORT->ODR ^= DEBUG2_PIN;
 443  00a1 c65023        	ld	a,20515
 444  00a4 a804          	xor	a,#4
 445                     ; 133 				break;
 447  00a6 201d          	jp	LC001
 448                     ; 136 		break;
 450  00a8               L541:
 451                     ; 138 		case VDEV_OUT8_LED_4:
 451                     ; 139 			switch (pportvalue)
 453  00a8 7b08          	ld	a,(OFST+7,sp)
 455                     ; 149 				break;
 456  00aa 2708          	jreq	L741
 457  00ac 4a            	dec	a
 458  00ad 270b          	jreq	L151
 459  00af 4a            	dec	a
 460  00b0 270e          	jreq	L351
 461  00b2 2014          	jra	L502
 462  00b4               L741:
 463                     ; 141 				case LED_ON:
 463                     ; 142 					DEBUG3_PORT->ODR |= DEBUG3_PIN;
 465  00b4 72165023      	bset	20515,#3
 466                     ; 143 				break;
 468  00b8 200e          	jra	L502
 469  00ba               L151:
 470                     ; 144 				case LED_OFF:
 470                     ; 145 					DEBUG3_PORT->ODR &= (u8)(~DEBUG3_PIN);
 472  00ba 72175023      	bres	20515,#3
 473                     ; 146 				break;
 475  00be 2008          	jra	L502
 476  00c0               L351:
 477                     ; 147 				case LED_TOGGLE:
 477                     ; 148 					DEBUG3_PORT->ODR ^= DEBUG3_PIN;
 479  00c0 c65023        	ld	a,20515
 480  00c3 a808          	xor	a,#8
 481  00c5               LC001:
 482  00c5 c75023        	ld	20515,a
 483                     ; 149 				break;
 485                     ; 152 		break;
 487  00c8               L502:
 488                     ; 154 	return ret;
 490  00c8 7b01          	ld	a,(OFST+0,sp)
 493  00ca 5b01          	addw	sp,#1
 494  00cc 81            	ret	
 537                     ; 157 errorcode vdev_fnout16(u32 addr, u16 pportvalue)
 537                     ; 158 {
 538                     	switch	.text
 539  00cd               _vdev_fnout16:
 541  00cd 88            	push	a
 542       00000001      OFST:	set	1
 545                     ; 159 	errorcode ret = VDEV_ERROR_NONE;
 547                     ; 161 	return ret;
 549  00ce 4f            	clr	a
 552  00cf 5b01          	addw	sp,#1
 553  00d1 81            	ret	
 596                     ; 164 errorcode vdev_fnout32(u32 addr, u32 pportvalue)
 596                     ; 165 {
 597                     	switch	.text
 598  00d2               _vdev_fnout32:
 600  00d2 88            	push	a
 601       00000001      OFST:	set	1
 604                     ; 166 	errorcode ret = VDEV_ERROR_NONE;
 606                     ; 168 	return ret;
 608  00d3 4f            	clr	a
 611  00d4 5b01          	addw	sp,#1
 612  00d6 81            	ret	
 625                     	xref	_GPIO_ReadInputPin
 626                     	xdef	_vdev_fnout32
 627                     	xdef	_vdev_fnout16
 628                     	xdef	_vdev_fnout8
 629                     	xdef	_vdev_fninp32
 630                     	xdef	_vdev_fninp16
 631                     	xdef	_vdev_fninp8
 632                     	xref.b	c_x
 651                     	xref	c_jltab
 652                     	xref	c_lcmp
 653                     	xref	c_ltor
 654                     	end

⌨️ 快捷键说明

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