Browse Source

style: Clean up layouts style

main
Mathias Rasmussen 4 years ago
parent
commit
b2c3db2a82
  1. 5
      Common.inc
  2. 7
      targets/A.inc
  3. 7
      targets/B.inc
  4. 21
      targets/Base.inc
  5. 10
      targets/C.inc
  6. 7
      targets/D.inc
  7. 14
      targets/E.inc
  8. 7
      targets/F.inc
  9. 7
      targets/G.inc
  10. 7
      targets/H.inc
  11. 7
      targets/I.inc
  12. 14
      targets/J.inc
  13. 7
      targets/K.inc
  14. 7
      targets/L.inc
  15. 14
      targets/M.inc
  16. 7
      targets/N.inc
  17. 7
      targets/O.inc
  18. 7
      targets/P.inc
  19. 17
      targets/Q.inc
  20. 7
      targets/R.inc
  21. 6
      targets/S.inc
  22. 7
      targets/T.inc
  23. 15
      targets/U.inc
  24. 10
      targets/V.inc
  25. 23
      targets/W.inc
  26. 7
      targets/Z.inc

5
Common.inc

@ -184,9 +184,11 @@ ENDM
Clear_COVF_Interrupt MACRO Clear_COVF_Interrupt MACRO
anl PCA0PWM, #0DFh anl PCA0PWM, #0DFh
ENDM ENDM
Enable_COVF_Interrupt MACRO Enable_COVF_Interrupt MACRO
orl PCA0PWM, #40h orl PCA0PWM, #40h
ENDM ENDM
Disable_COVF_Interrupt MACRO Disable_COVF_Interrupt MACRO
anl PCA0PWM, #0BFh anl PCA0PWM, #0BFh
ENDM ENDM
@ -195,9 +197,11 @@ ENDM
Clear_CCF_Interrupt MACRO Clear_CCF_Interrupt MACRO
anl PCA0CN0, #0FEh anl PCA0CN0, #0FEh
ENDM ENDM
Enable_CCF_Interrupt MACRO Enable_CCF_Interrupt MACRO
orl PCA0CPM0,#01h orl PCA0CPM0,#01h
ENDM ENDM
Disable_CCF_Interrupt MACRO Disable_CCF_Interrupt MACRO
anl PCA0CPM0,#0FEh anl PCA0CPM0,#0FEh
ENDM ENDM
@ -241,5 +245,6 @@ ENDM
Set_RPM_Out MACRO Set_RPM_Out MACRO
ENDM ENDM
Clear_RPM_Out MACRO Clear_RPM_Out MACRO
ENDM ENDM

7
targets/A.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/B.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

21
targets/Base.inc

@ -156,6 +156,7 @@ IF FETON_DELAY == 0
cON P_AcomFET cON P_AcomFET
ENDIF ENDIF
ENDM ENDM
ApwmFET_off MACRO ApwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
pOFF P_ApwmFET pOFF P_ApwmFET
@ -163,12 +164,14 @@ ELSE
cOFF P_AcomFET cOFF P_AcomFET
ENDIF ENDIF
ENDM ENDM
BpwmFET_on MACRO BpwmFET_on MACRO
pON P_BpwmFET pON P_BpwmFET
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_BcomFET cON P_BcomFET
ENDIF ENDIF
ENDM ENDM
BpwmFET_off MACRO BpwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
pOFF P_BpwmFET pOFF P_BpwmFET
@ -176,12 +179,14 @@ ELSE
cOFF P_BcomFET cOFF P_BcomFET
ENDIF ENDIF
ENDM ENDM
CpwmFET_on MACRO CpwmFET_on MACRO
pON P_CpwmFET pON P_CpwmFET
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_CcomFET cON P_CcomFET
ENDIF ENDIF
ENDM ENDM
CpwmFET_off MACRO CpwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
pOFF P_CpwmFET pOFF P_CpwmFET
@ -189,39 +194,48 @@ ELSE
cOFF P_CcomFET cOFF P_CcomFET
ENDIF ENDIF
ENDM ENDM
All_pwmFETs_Off MACRO All_pwmFETs_Off MACRO
ApwmFET_off ApwmFET_off
BpwmFET_off BpwmFET_off
CpwmFET_off CpwmFET_off
ENDM ENDM
AcomFET_on MACRO AcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
pOFF P_ApwmFET pOFF P_ApwmFET
ENDIF ENDIF
cON P_AcomFET cON P_AcomFET
ENDM ENDM
AcomFET_off MACRO AcomFET_off MACRO
cOFF P_AcomFET cOFF P_AcomFET
ENDM ENDM
BcomFET_on MACRO BcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
pOFF P_BpwmFET pOFF P_BpwmFET
ENDIF ENDIF
cON P_BcomFET cON P_BcomFET
ENDM ENDM
BcomFET_off MACRO BcomFET_off MACRO
cOFF P_BcomFET cOFF P_BcomFET
ENDM ENDM
CcomFET_on MACRO CcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
pOFF P_CpwmFET pOFF P_CpwmFET
ENDIF ENDIF
cON P_CcomFET cON P_CcomFET
ENDM ENDM
CcomFET_off MACRO CcomFET_off MACRO
cOFF P_CcomFET cOFF P_CcomFET
ENDM ENDM
All_comFETs_Off MACRO All_comFETs_Off MACRO
AcomFET_off AcomFET_off
BcomFET_off BcomFET_off
@ -235,18 +249,25 @@ $if NOT CUSTOM_LED
Set_LED_0 MACRO Set_LED_0 MACRO
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

10
targets/C.inc

@ -50,11 +50,8 @@ P0_INIT EQU NOT((1 SHL A_pwm) + (1 SHL A_com))
P0_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL A_com) P0_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL A_com)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -121,6 +118,7 @@ ELSE
mov P1SKIP, #0FFh mov P1SKIP, #0FFh
ENDIF ENDIF
ENDM ENDM
Set_Pwm_B MACRO Set_Pwm_B MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_BcomFET cON P_BcomFET
@ -131,6 +129,7 @@ ELSE
mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com))) mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com)))
ENDIF ENDIF
ENDM ENDM
Set_Pwm_C MACRO Set_Pwm_C MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_CcomFET cON P_CcomFET
@ -141,6 +140,7 @@ ELSE
mov P1SKIP, #(NOT ((1 SHL C_pwm) + (1 SHL C_com))) mov P1SKIP, #(NOT ((1 SHL C_pwm) + (1 SHL C_com)))
ENDIF ENDIF
ENDM ENDM
Set_Pwms_Off MACRO Set_Pwms_Off MACRO
mov P0SKIP, #0FFh mov P0SKIP, #0FFh
mov P1SKIP, #0FFh mov P1SKIP, #0FFh

7
targets/D.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 0
; Damping noninverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

14
targets/E.inc

@ -48,11 +48,8 @@ P0_INIT EQU NOT((1 SHL LED_0) + (1 SHL LED_1))
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -127,22 +124,29 @@ P2_SKIP EQU 0FFh
Set_LED_0 MACRO Set_LED_0 MACRO
setb P0.LED_0 setb P0.LED_0
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
setb P0.LED_1 setb P0.LED_1
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
clr P0.LED_1 clr P0.LED_1
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
setb P1.LED_2 setb P1.LED_2
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
clr P1.LED_2 clr P1.LED_2
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

7
targets/F.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/G.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/H.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/I.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

14
targets/J.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2) P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -122,22 +119,29 @@ P2_SKIP EQU 0FFh
Set_LED_0 MACRO Set_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
setb P0.LED_0 setb P0.LED_0
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
clr P0.LED_1 clr P0.LED_1
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
setb P0.LED_1 setb P0.LED_1
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
clr P0.LED_2 clr P0.LED_2
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
setb P0.LED_2 setb P0.LED_2
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

7
targets/K.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 0
; Damping noninverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/L.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

14
targets/M.inc

@ -49,11 +49,8 @@ P0_INIT EQU NOT(1 SHL LED_0)
P0_PUSHPULL EQU (1 SHL LED_0) P0_PUSHPULL EQU (1 SHL LED_0)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -132,18 +129,25 @@ P2_SKIP EQU 0FFh
Set_LED_0 MACRO Set_LED_0 MACRO
setb P0.LED_0 setb P0.LED_0
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

7
targets/N.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/O.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 0
; Damping noninverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/P.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

17
targets/Q.inc

@ -50,11 +50,8 @@ P0_INIT EQU (1 SHL Rcp_In)
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -121,6 +118,7 @@ ELSE
mov P1SKIP, #(NOT (1 SHL A_com)) mov P1SKIP, #(NOT (1 SHL A_com))
ENDIF ENDIF
ENDM ENDM
Set_Pwm_B MACRO Set_Pwm_B MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_BcomFET cON P_BcomFET
@ -131,6 +129,7 @@ ELSE
mov P1SKIP, #(NOT (1 SHL B_com)) mov P1SKIP, #(NOT (1 SHL B_com))
ENDIF ENDIF
ENDM ENDM
Set_Pwm_C MACRO Set_Pwm_C MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_CcomFET cON P_CcomFET
@ -141,6 +140,7 @@ ELSE
mov P1SKIP, #(NOT (1 SHL C_com)) mov P1SKIP, #(NOT (1 SHL C_com))
ENDIF ENDIF
ENDM ENDM
Set_Pwms_Off MACRO Set_Pwms_Off MACRO
mov P0SKIP, #0FFh mov P0SKIP, #0FFh
mov P1SKIP, #0FFh mov P1SKIP, #0FFh
@ -167,20 +167,27 @@ P2_SKIP EQU 0FFh
Set_LED_0 MACRO Set_LED_0 MACRO
setb P0.LED_0 setb P0.LED_0
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
setb P0.LED_1 setb P0.LED_1
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
clr P0.LED_1 clr P0.LED_1
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

7
targets/R.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

6
targets/S.inc

@ -48,10 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

7
targets/T.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

15
targets/U.inc

@ -49,11 +49,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2) P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -132,23 +129,29 @@ P2_SKIP EQU 0FFh
Set_LED_0 MACRO Set_LED_0 MACRO
clr P0.LED_0 clr P0.LED_0
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
setb P0.LED_0 setb P0.LED_0
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
clr P0.LED_1 clr P0.LED_1
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
setb P0.LED_1 setb P0.LED_1
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
clr P0.LED_2 clr P0.LED_2
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
setb P0.LED_2 setb P0.LED_2
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

10
targets/V.inc

@ -50,11 +50,8 @@ P0_INIT EQU NOT(1 SHL C_com)
P0_PUSHPULL EQU (1 SHL C_com) P0_PUSHPULL EQU (1 SHL C_com)
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm noninverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0
@ -121,6 +118,7 @@ ELSE
mov P1SKIP, #(NOT ((1 SHL A_pwm) + (1 SHL A_com))) mov P1SKIP, #(NOT ((1 SHL A_pwm) + (1 SHL A_com)))
ENDIF ENDIF
ENDM ENDM
Set_Pwm_B MACRO Set_Pwm_B MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_BcomFET cON P_BcomFET
@ -131,6 +129,7 @@ ELSE
mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com))) mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com)))
ENDIF ENDIF
ENDM ENDM
Set_Pwm_C MACRO Set_Pwm_C MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
cON P_CcomFET cON P_CcomFET
@ -141,6 +140,7 @@ ELSE
mov P1SKIP, #(NOT (1 SHL C_pwm)) mov P1SKIP, #(NOT (1 SHL C_pwm))
ENDIF ENDIF
ENDM ENDM
Set_Pwms_Off MACRO Set_Pwms_Off MACRO
mov P0SKIP, #0FFh mov P0SKIP, #0FFh
mov P1SKIP, #0FFh mov P1SKIP, #0FFh

23
targets/W.inc

@ -107,23 +107,29 @@ ApwmFET_on MACRO
setb P1.A_pwm ; set pin to high setb P1.A_pwm ; set pin to high
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver
ENDM ENDM
ApwmFET_off MACRO ApwmFET_off MACRO
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
BpwmFET_on MACRO BpwmFET_on MACRO
setb P1.B_pwm ; set pin to high setb P1.B_pwm ; set pin to high
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver
ENDM ENDM
BpwmFET_off MACRO BpwmFET_off MACRO
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
CpwmFET_on MACRO CpwmFET_on MACRO
setb P1.C_pwm ; set pin to high setb P1.C_pwm ; set pin to high
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver
ENDM ENDM
CpwmFET_off MACRO CpwmFET_off MACRO
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
All_pwmFETs_Off MACRO All_pwmFETs_Off MACRO
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
@ -132,38 +138,48 @@ AcomFET_on MACRO
clr P1.A_pwm ; set pin to low clr P1.A_pwm ; set pin to low
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver
ENDM ENDM
AcomFET_off MACRO AcomFET_off MACRO
anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL A_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
BcomFET_on MACRO BcomFET_on MACRO
clr P1.B_pwm ; set pin to low clr P1.B_pwm ; set pin to low
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver
ENDM ENDM
BcomFET_off MACRO BcomFET_off MACRO
anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL B_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
CcomFET_on MACRO CcomFET_on MACRO
clr P1.C_pwm ; set pin to low clr P1.C_pwm ; set pin to low
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver
ENDM ENDM
CcomFET_off MACRO CcomFET_off MACRO
anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT(1 SHL C_pwm)) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
All_comFETs_Off MACRO All_comFETs_Off MACRO
anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating anl P1MDIN, #(NOT((1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm))) ; analog in -> pullup, driver and digital in is disable = floating
ENDM ENDM
Set_Pwm_A MACRO Set_Pwm_A MACRO
mov P1SKIP, #(NOT(1 SHL A_pwm)); mov P1SKIP, #(NOT(1 SHL A_pwm));
orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver orl P1MDIN, #(1 SHL A_pwm) ; enable pin driver
ENDM ENDM
Set_Pwm_B MACRO Set_Pwm_B MACRO
mov P1SKIP, #(NOT(1 SHL B_pwm)); mov P1SKIP, #(NOT(1 SHL B_pwm));
orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver orl P1MDIN, #(1 SHL B_pwm) ; enable pin driver
ENDM ENDM
Set_Pwm_C MACRO Set_Pwm_C MACRO
mov P1SKIP, #(NOT(1 SHL C_pwm)); mov P1SKIP, #(NOT(1 SHL C_pwm));
orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver orl P1MDIN, #(1 SHL C_pwm) ; enable pin driver
ENDM ENDM
Set_Pwms_Off MACRO Set_Pwms_Off MACRO
mov P1SKIP, #P1_SKIP; mov P1SKIP, #P1_SKIP;
ENDM ENDM
@ -209,17 +225,24 @@ ENDM
Set_LED_0 MACRO Set_LED_0 MACRO
ENDM ENDM
Clear_LED_0 MACRO Clear_LED_0 MACRO
ENDM ENDM
Set_LED_1 MACRO Set_LED_1 MACRO
ENDM ENDM
Clear_LED_1 MACRO Clear_LED_1 MACRO
ENDM ENDM
Set_LED_2 MACRO Set_LED_2 MACRO
ENDM ENDM
Clear_LED_2 MACRO Clear_LED_2 MACRO
ENDM ENDM
Set_LED_3 MACRO Set_LED_3 MACRO
ENDM ENDM
Clear_LED_3 MACRO Clear_LED_3 MACRO
ENDM ENDM

7
targets/Z.inc

@ -48,11 +48,8 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0 P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 0
COMPWM_ACTIVE_HIGH EQU 1
; Damping inverted, pwm inverted
PWM_ACTIVE_HIGH EQU 0 ; Pwm inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0 IF FETON_DELAY == 0

Loading…
Cancel
Save