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

📄 stm8s_wwdg.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
  59                     ; 66 void WWDG_Init(u8 Counter, u8 WindowValue)
  59                     ; 67 {
  61                     	switch	.text
  62  0000               _WWDG_Init:
  64  0000 89            	pushw	x
  65       00000000      OFST:	set	0
  68                     ; 69   assert_param(IS_WWDG_WINDOWLIMITVALUE_OK(WindowValue));
  70                     ; 70   WWDG->WR = WWDG_WR_RESET_VALUE;
  72  0001 357f50d2      	mov	20690,#127
  73                     ; 71   WWDG->CR = (u8)(WWDG_CR_WDGA | WWDG_CR_T6 | Counter);
  75  0005 9e            	ld	a,xh
  76  0006 aac0          	or	a,#192
  77  0008 c750d1        	ld	20689,a
  78                     ; 72   WWDG->WR = (u8)((u8)(~WWDG_CR_WDGA) & (u8)(WWDG_CR_T6 | WindowValue));
  80  000b 7b02          	ld	a,(OFST+2,sp)
  81  000d aa40          	or	a,#64
  82  000f a47f          	and	a,#127
  83  0011 c750d2        	ld	20690,a
  84                     ; 73 }
  87  0014 85            	popw	x
  88  0015 81            	ret
 120                     ; 92 void WWDG_SetCounter(u8 Counter)
 120                     ; 93 {
 121                     	switch	.text
 122  0016               _WWDG_SetCounter:
 124  0016 88            	push	a
 125       00000000      OFST:	set	0
 128                     ; 96   assert_param(IS_WWDG_COUNTERVALUE_OK(Counter));
 130                     ; 98   if ((WWDG->CR & (u8)(~WWDG_CR_WDGA)) < (WWDG->WR))
 132  0017 c650d1        	ld	a,20689
 133  001a a47f          	and	a,#127
 134  001c c150d2        	cp	a,20690
 135  001f 2407          	jruge	L34
 136                     ; 100     WWDG->CR = (u8)(WWDG_CR_WDGA | WWDG_CR_T6 | Counter);
 138  0021 7b01          	ld	a,(OFST+1,sp)
 139  0023 aac0          	or	a,#192
 140  0025 c750d1        	ld	20689,a
 141  0028               L34:
 142                     ; 103 }
 145  0028 84            	pop	a
 146  0029 81            	ret
 169                     ; 123 u8 WWDG_GetCounter(void)
 169                     ; 124 {
 170                     	switch	.text
 171  002a               _WWDG_GetCounter:
 175                     ; 125   return(WWDG->CR);
 177  002a c650d1        	ld	a,20689
 180  002d 81            	ret
 203                     ; 144 void WWDG_SWReset(void)
 203                     ; 145 {
 204                     	switch	.text
 205  002e               _WWDG_SWReset:
 209                     ; 146   WWDG->CR = WWDG_CR_WDGA; /* Activate WWDG, with clearing T6 */
 211  002e 358050d1      	mov	20689,#128
 212                     ; 147 }
 215  0032 81            	ret
 248                     ; 165 void WWDG_SetWindowValue(u8 WindowValue)
 248                     ; 166 {
 249                     	switch	.text
 250  0033               _WWDG_SetWindowValue:
 254                     ; 168   assert_param(IS_WWDG_WINDOWLIMITVALUE_OK(WindowValue));
 256                     ; 169   WWDG->WR = (u8)((u8)(~WWDG_CR_WDGA) & (u8)(WWDG_CR_T6 | WindowValue));
 258  0033 aa40          	or	a,#64
 259  0035 a47f          	and	a,#127
 260  0037 c750d2        	ld	20690,a
 261                     ; 170 }
 264  003a 81            	ret
 277                     	xdef	_WWDG_SetWindowValue
 278                     	xdef	_WWDG_SWReset
 279                     	xdef	_WWDG_GetCounter
 280                     	xdef	_WWDG_SetCounter
 281                     	xdef	_WWDG_Init
 300                     	end

⌨️ 快捷键说明

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