..
This commit is contained in:
421
firmware/STM8L15X_LD/stm8l15x_itc.asm
Normal file
421
firmware/STM8L15X_LD/stm8l15x_itc.asm
Normal file
@@ -0,0 +1,421 @@
|
||||
;--------------------------------------------------------
|
||||
; File Created by SDCC : free open source ISO C Compiler
|
||||
; Version 4.5.0 #15242 (Linux)
|
||||
;--------------------------------------------------------
|
||||
.module stm8l15x_itc
|
||||
|
||||
;--------------------------------------------------------
|
||||
; Public variables in this module
|
||||
;--------------------------------------------------------
|
||||
.globl _ITC_GetCPUCC
|
||||
.globl _ITC_DeInit
|
||||
.globl _ITC_GetSoftIntStatus
|
||||
.globl _ITC_GetSoftwarePriority
|
||||
.globl _ITC_SetSoftwarePriority
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
.area DATA
|
||||
;--------------------------------------------------------
|
||||
; ram data
|
||||
;--------------------------------------------------------
|
||||
.area INITIALIZED
|
||||
;--------------------------------------------------------
|
||||
; absolute external ram data
|
||||
;--------------------------------------------------------
|
||||
.area DABS (ABS)
|
||||
|
||||
; default segment ordering for linker
|
||||
.area HOME
|
||||
.area GSINIT
|
||||
.area GSFINAL
|
||||
.area CONST
|
||||
.area INITIALIZER
|
||||
.area CODE
|
||||
|
||||
;--------------------------------------------------------
|
||||
; global & static initialisations
|
||||
;--------------------------------------------------------
|
||||
.area HOME
|
||||
.area GSINIT
|
||||
.area GSFINAL
|
||||
.area GSINIT
|
||||
;--------------------------------------------------------
|
||||
; Home
|
||||
;--------------------------------------------------------
|
||||
.area HOME
|
||||
.area HOME
|
||||
;--------------------------------------------------------
|
||||
; code
|
||||
;--------------------------------------------------------
|
||||
.area CODE
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 56: uint8_t ITC_GetCPUCC(void)
|
||||
; -----------------------------------------
|
||||
; function ITC_GetCPUCC
|
||||
; -----------------------------------------
|
||||
_ITC_GetCPUCC:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 65: __asm__("push cc");
|
||||
push cc
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 66: __asm__("pop a");
|
||||
pop a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 71: }
|
||||
ret
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 90: void ITC_DeInit(void)
|
||||
; -----------------------------------------
|
||||
; function ITC_DeInit
|
||||
; -----------------------------------------
|
||||
_ITC_DeInit:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 92: ITC->ISPR1 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f70+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 93: ITC->ISPR2 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f71+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 94: ITC->ISPR3 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f72+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 95: ITC->ISPR4 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f73+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 96: ITC->ISPR5 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f74+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 97: ITC->ISPR6 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f75+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 98: ITC->ISPR7 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f76+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 99: ITC->ISPR8 = ITC_SPRX_RESET_VALUE;
|
||||
mov 0x7f77+0, #0xff
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 100: }
|
||||
ret
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 107: uint8_t ITC_GetSoftIntStatus(void)
|
||||
; -----------------------------------------
|
||||
; function ITC_GetSoftIntStatus
|
||||
; -----------------------------------------
|
||||
_ITC_GetSoftIntStatus:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 109: return ((uint8_t)(ITC_GetCPUCC() & CPU_SOFT_INT_DISABLED));
|
||||
call _ITC_GetCPUCC
|
||||
and a, #0x28
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 110: }
|
||||
ret
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 117: ITC_PriorityLevel_TypeDef ITC_GetSoftwarePriority(IRQn_TypeDef IRQn)
|
||||
; -----------------------------------------
|
||||
; function ITC_GetSoftwarePriority
|
||||
; -----------------------------------------
|
||||
_ITC_GetSoftwarePriority:
|
||||
pushw x
|
||||
ld xl, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 119: uint8_t Value = 0;
|
||||
clr a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 126: Mask = (uint8_t)(0x03U << ((IRQn % 4U) * 2U));
|
||||
ldw y, x
|
||||
push a
|
||||
ld a, yl
|
||||
and a, #0x03
|
||||
ld xh, a
|
||||
pop a
|
||||
rlwa x
|
||||
ld (0x01, sp), a
|
||||
rrwa x
|
||||
sll (0x01, sp)
|
||||
push a
|
||||
ld a, #0x03
|
||||
ld (0x03, sp), a
|
||||
ld a, (0x02, sp)
|
||||
jreq 00139$
|
||||
00138$:
|
||||
sll (0x03, sp)
|
||||
dec a
|
||||
jrne 00138$
|
||||
00139$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 128: switch (IRQn)
|
||||
ld a, xl
|
||||
cp a, #0x1d
|
||||
pop a
|
||||
jrugt 00128$
|
||||
rlwa x
|
||||
clr a
|
||||
rrwa x
|
||||
sllw x
|
||||
ldw x, (#00141$, x)
|
||||
jp (x)
|
||||
00141$:
|
||||
.dw #00128$
|
||||
.dw #00103$
|
||||
.dw #00103$
|
||||
.dw #00103$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00128$
|
||||
.dw #00118$
|
||||
.dw #00118$
|
||||
.dw #00118$
|
||||
.dw #00121$
|
||||
.dw #00121$
|
||||
.dw #00121$
|
||||
.dw #00128$
|
||||
.dw #00128$
|
||||
.dw #00124$
|
||||
.dw #00124$
|
||||
.dw #00124$
|
||||
.dw #00126$
|
||||
.dw #00126$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 132: case DMA1_CHANNEL2_3_IRQn:
|
||||
00103$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 133: Value = (uint8_t)(ITC->ISPR1 & Mask); /* Read software priority */
|
||||
ld a, 0x7f70
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 134: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 144: case EXTID_IRQn:
|
||||
00107$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 150: Value = (uint8_t)(ITC->ISPR2 & Mask); /* Read software priority */
|
||||
ld a, 0x7f71
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 151: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 156: case EXTI3_IRQn:
|
||||
00111$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 157: Value = (uint8_t)(ITC->ISPR3 & Mask); /* Read software priority */
|
||||
ld a, 0x7f72
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 158: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 163: case EXTI7_IRQn:
|
||||
00115$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 164: Value = (uint8_t)(ITC->ISPR4 & Mask); /* Read software priority */
|
||||
ld a, 0x7f73
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 165: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 177: case TIM2_UPD_OVF_TRG_BRK_IRQn:
|
||||
00118$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 182: Value = (uint8_t)(ITC->ISPR5 & Mask); /* Read software priority */
|
||||
ld a, 0x7f74
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 183: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 192: case TIM3_CC_IRQn:
|
||||
00121$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 198: Value = (uint8_t)(ITC->ISPR6 & Mask); /* Read software priority */
|
||||
ld a, 0x7f75
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 199: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 208: case USART1_TX_IRQn:
|
||||
00124$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 212: Value = (uint8_t)(ITC->ISPR7 & Mask); /* Read software priority */
|
||||
ld a, 0x7f76
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 213: break;
|
||||
jra 00128$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 218: case I2C1_IRQn:
|
||||
00126$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 223: Value = (uint8_t)(ITC->ISPR8 & Mask); /* Read software priority */
|
||||
ld a, 0x7f77
|
||||
and a, (0x02, sp)
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 228: }
|
||||
00128$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 230: Value >>= (uint8_t)((IRQn % 4u) * 2u);
|
||||
push a
|
||||
ld a, (0x02, sp)
|
||||
jreq 00143$
|
||||
00142$:
|
||||
srl (1, sp)
|
||||
dec a
|
||||
jrne 00142$
|
||||
00143$:
|
||||
pop a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 232: return((ITC_PriorityLevel_TypeDef)Value);
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 234: }
|
||||
popw x
|
||||
ret
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 253: void ITC_SetSoftwarePriority(IRQn_TypeDef IRQn, ITC_PriorityLevel_TypeDef ITC_PriorityLevel)
|
||||
; -----------------------------------------
|
||||
; function ITC_SetSoftwarePriority
|
||||
; -----------------------------------------
|
||||
_ITC_SetSoftwarePriority:
|
||||
pushw x
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 267: Mask = (uint8_t)(~(uint8_t)(0x03U << ((IRQn % 4U) * 2U)));
|
||||
ld xl, a
|
||||
and a, #0x03
|
||||
sll a
|
||||
ld xh, a
|
||||
ld a, #0x03
|
||||
push a
|
||||
ld a, xh
|
||||
tnz a
|
||||
jreq 00139$
|
||||
00138$:
|
||||
sll (1, sp)
|
||||
dec a
|
||||
jrne 00138$
|
||||
00139$:
|
||||
pop a
|
||||
cpl a
|
||||
ld (0x01, sp), a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 269: NewPriority = (uint8_t)((uint8_t)(ITC_PriorityLevel) << ((IRQn % 4U) * 2U));
|
||||
ld a, (0x05, sp)
|
||||
push a
|
||||
ld a, xh
|
||||
tnz a
|
||||
jreq 00141$
|
||||
00140$:
|
||||
sll (1, sp)
|
||||
dec a
|
||||
jrne 00140$
|
||||
00141$:
|
||||
pop a
|
||||
ld (0x02, sp), a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 271: switch (IRQn)
|
||||
ld a, xl
|
||||
cp a, #0x1d
|
||||
jrule 00142$
|
||||
jp 00129$
|
||||
00142$:
|
||||
clr a
|
||||
ld xh, a
|
||||
sllw x
|
||||
ldw x, (#00143$, x)
|
||||
jp (x)
|
||||
00143$:
|
||||
.dw #00129$
|
||||
.dw #00103$
|
||||
.dw #00103$
|
||||
.dw #00103$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00107$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00111$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00115$
|
||||
.dw #00129$
|
||||
.dw #00118$
|
||||
.dw #00118$
|
||||
.dw #00118$
|
||||
.dw #00121$
|
||||
.dw #00121$
|
||||
.dw #00121$
|
||||
.dw #00129$
|
||||
.dw #00129$
|
||||
.dw #00124$
|
||||
.dw #00124$
|
||||
.dw #00124$
|
||||
.dw #00126$
|
||||
.dw #00126$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 275: case DMA1_CHANNEL2_3_IRQn:
|
||||
00103$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 276: ITC->ISPR1 &= Mask;
|
||||
ld a, 0x7f70
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f70, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 277: ITC->ISPR1 |= NewPriority;
|
||||
ld a, 0x7f70
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f70, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 278: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 288: case EXTID_IRQn:
|
||||
00107$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 294: ITC->ISPR2 &= Mask;
|
||||
ld a, 0x7f71
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f71, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 295: ITC->ISPR2 |= NewPriority;
|
||||
ld a, 0x7f71
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f71, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 296: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 301: case EXTI3_IRQn:
|
||||
00111$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 302: ITC->ISPR3 &= Mask;
|
||||
ld a, 0x7f72
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f72, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 303: ITC->ISPR3 |= NewPriority;
|
||||
ld a, 0x7f72
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f72, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 304: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 309: case EXTI7_IRQn:
|
||||
00115$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 310: ITC->ISPR4 &= Mask;
|
||||
ld a, 0x7f73
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f73, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 311: ITC->ISPR4 |= NewPriority;
|
||||
ld a, 0x7f73
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f73, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 312: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 323: case TIM2_UPD_OVF_TRG_BRK_IRQn:
|
||||
00118$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 328: ITC->ISPR5 &= Mask;
|
||||
ld a, 0x7f74
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f74, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 329: ITC->ISPR5 |= NewPriority;
|
||||
ld a, 0x7f74
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f74, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 330: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 338: case TIM3_CC_IRQn:
|
||||
00121$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 344: ITC->ISPR6 &= Mask;
|
||||
ld a, 0x7f75
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f75, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 345: ITC->ISPR6 |= NewPriority;
|
||||
ld a, 0x7f75
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f75, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 346: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 355: case USART1_TX_IRQn:
|
||||
00124$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 359: ITC->ISPR7 &= Mask;
|
||||
ld a, 0x7f76
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f76, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 360: ITC->ISPR7 |= NewPriority;
|
||||
ld a, 0x7f76
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f76, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 361: break;
|
||||
jra 00129$
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 366: case I2C1_IRQn:
|
||||
00126$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 371: ITC->ISPR8 &= Mask;
|
||||
ld a, 0x7f77
|
||||
and a, (0x01, sp)
|
||||
ld 0x7f77, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 372: ITC->ISPR8 |= NewPriority;
|
||||
ld a, 0x7f77
|
||||
or a, (0x02, sp)
|
||||
ld 0x7f77, a
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 377: }
|
||||
00129$:
|
||||
; ../inc/stm8l151x/src/stm8l15x_itc.c: 378: }
|
||||
popw x
|
||||
popw x
|
||||
pop a
|
||||
jp (x)
|
||||
.area CODE
|
||||
.area CONST
|
||||
.area INITIALIZER
|
||||
.area CABS (ABS)
|
||||
Reference in New Issue
Block a user