Browse Source

style: Clean up layout files ordering and whitespace

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

29
targets/A.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,30 +85,12 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -118,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

27
targets/B.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -49,9 +53,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -85,28 +86,12 @@ C_pwm EQU 1 ;o
C_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -117,3 +102,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

101
targets/Base.inc

@ -1,4 +1,34 @@
;**** **** **** **** ****
;
; Bluejay digital ESC firmware for controlling brushless motors in multirotors
;
; Copyright 2020 Mathias Rasmussen
; Copyright 2011, 2012 Steffen Skaug
;
; This file is part of Bluejay.
;
; Bluejay is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; Bluejay is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with Bluejay. If not, see <http://www.gnu.org/licenses/>.
;
;**** **** **** **** ****
;
; Base layout
;
; The inheriting layout should
; - Specify PWM_ACTIVE_HIGH, COMPWM_ACTIVE_HIGH and COMP_PORT
; - Set CUSTOM_* flags to override default implementation
;
;**** **** **** **** ****
;**** **** **** **** ****
@ -122,22 +152,22 @@ $endif
;**** **** **** **** ****
; Fets on/off toggling
; Toggling FETs on/off
;**** **** **** **** ****
$if NOT CUSTOM_FET_TOGGLING
IF PWM_ACTIVE_HIGH == 1 ; fet active high
IF PWM_ACTIVE_HIGH == 1 ; PWM FET active high
pON LIT 'setb'
pOFF LIT 'clr'
ELSE ; fet active low
ELSE ; PWM FET active low
pON LIT 'clr'
pOFF LIT 'setb'
ENDIF
IF COMPWM_ACTIVE_HIGH == 1 ; comfet active high
IF COMPWM_ACTIVE_HIGH == 1 ; COM FET active high
cON LIT 'setb'
cOFF LIT 'clr'
ELSE ; comfet active low
ELSE ; COM FET active low
cON LIT 'clr'
cOFF LIT 'setb'
ENDIF
@ -194,7 +224,6 @@ All_pwmFETs_Off MACRO
ENDM
AcomFET_on MACRO
IF FETON_DELAY == 0
pOFF P_ApwmFET
@ -237,34 +266,6 @@ ENDM
$endif
$if NOT CUSTOM_LED
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM
$endif
;**** **** **** **** ****
; ADC and temperature measurement
;**** **** **** **** ****
@ -296,3 +297,33 @@ Stop_Adc MACRO
ENDM
;**** **** **** **** ****
; LEDs
;**** **** **** **** ****
$if NOT CUSTOM_LED
Set_LED_0 MACRO
ENDM
Clear_LED_0 MACRO
ENDM
Set_LED_1 MACRO
ENDM
Clear_LED_1 MACRO
ENDM
Set_LED_2 MACRO
ENDM
Clear_LED_2 MACRO
ENDM
Set_LED_3 MACRO
ENDM
Clear_LED_3 MACRO
ENDM
$endif

24
targets/C.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -44,15 +47,11 @@ Comp_Com EQU 2 ;i
Rcp_In EQU 0 ;i
P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL Comp_Com))
P0_INIT EQU NOT((1 SHL A_pwm) + (1 SHL A_com))
P0_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL A_com)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -86,7 +85,6 @@ B_com EQU 1 ;o
B_pwm EQU 0 ;o
P_ApwmFET EQU P0.A_pwm
P_AcomFET EQU P0.A_com
P_BpwmFET EQU P1.B_pwm
@ -94,12 +92,6 @@ P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_PWM_PHASE)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
@ -107,7 +99,6 @@ P1_PUSHPULL EQU (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
Set_Pwm_A MACRO
IF FETON_DELAY == 0
cON P_AcomFET
@ -147,8 +138,6 @@ Set_Pwms_Off MACRO
ENDM
;*********************
; PORT 2 definitions *
;*********************
@ -159,3 +148,8 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_PWM_PHASE)
$include (Base.inc)

27
targets/D.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -116,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

43
targets/E.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -48,9 +51,6 @@ P0_INIT EQU NOT((1 SHL LED_0) + (1 SHL LED_1))
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,29 +84,12 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_PWM_SETUP, CUSTOM_LED)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com) + (1 SHL LED_2)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com) + (1 SHL LED_2)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -117,10 +100,9 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
;**** **** **** **** ****
; MCU specific
;**** **** **** **** ****
Initialize_Xbar MACRO
mov XBR2, #40h ;; Xbar enabled
mov XBR1, #02h ;; CEX0 and CEX1 routed to pins
@ -142,6 +124,10 @@ ELSE
ENDIF
ENDM
;**** **** **** **** ****
; LED configuration
;**** **** **** **** ****
Set_LED_0 MACRO
setb P0.LED_0
ENDM
@ -171,3 +157,10 @@ ENDM
Clear_LED_3 MACRO
ENDM
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_PWM_SETUP, CUSTOM_LED)
$include (Base.inc)

27
targets/F.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -116,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

27
targets/G.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -116,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

27
targets/H.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -49,9 +53,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -85,28 +86,12 @@ B_com EQU 1 ;o
C_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -117,3 +102,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

25
targets/I.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -83,26 +84,12 @@ B_pwm EQU 1 ;o
C_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -113,3 +100,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

35
targets/J.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -48,9 +51,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -83,25 +83,12 @@ B_pwm EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_LED)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -112,10 +99,9 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
;**** **** **** **** ****
; LED configuration
;**** **** **** **** ****
Set_LED_0 MACRO
clr P0.LED_0
ENDM
@ -145,3 +131,10 @@ ENDM
Clear_LED_3 MACRO
ENDM
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_LED)
$include (Base.inc)

27
targets/K.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ B_com EQU 1 ;o
A_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -116,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

23
targets/L.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -83,24 +84,12 @@ B_pwm EQU 1 ;o
C_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -111,3 +100,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

44
targets/M.inc

@ -27,9 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -49,9 +51,6 @@ P0_INIT EQU NOT(1 SHL LED_0)
P0_PUSHPULL EQU (1 SHL LED_0)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -72,7 +71,6 @@ ELSE
ENDIF
;*********************
; PORT 1 definitions *
;*********************
@ -86,29 +84,12 @@ A_pwm EQU 1 ;o
; EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_LED)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -119,13 +100,9 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
;**** **** **** **** ****
; LED configuration
;**** **** **** **** ****
Set_LED_0 MACRO
setb P0.LED_0
ENDM
@ -151,3 +128,10 @@ ENDM
Clear_LED_3 MACRO
ENDM
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_LED)
$include (Base.inc)

27
targets/N.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -49,9 +53,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -85,28 +86,12 @@ A_pwm EQU 1 ;o
A_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -117,3 +102,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

25
targets/O.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -48,9 +51,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,16 +84,6 @@ A_com EQU 1 ;o
A_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_COMP_SETUP)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
@ -110,8 +100,6 @@ Read_Comp_Out MACRO
ENDM
;*********************
; PORT 2 definitions *
;*********************
@ -122,3 +110,8 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_COMP_SETUP)
$include (Base.inc)

28
targets/P.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -49,9 +53,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -72,7 +73,6 @@ ELSE
ENDIF
;*********************
; PORT 1 definitions *
;*********************
@ -86,28 +86,12 @@ A_pwm EQU 1 ;o
; EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -118,3 +102,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

34
targets/Q.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 1
;*********************
@ -44,15 +47,11 @@ Rcp_In EQU 1 ;i
; EQU 0 ;i
P0_DIGITAL EQU 0FFh
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_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -86,7 +85,6 @@ B_com EQU 1 ;o
A_com EQU 0 ;o
P_ApwmFET EQU P0.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P0.B_pwm
@ -94,12 +92,6 @@ P_BcomFET EQU P1.B_com
P_CpwmFET EQU P0.C_pwm
P_CcomFET EQU P1.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 1
$set(CUSTOM_PWM_PHASE, CUSTOM_LED)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
@ -107,7 +99,6 @@ P1_PUSHPULL EQU (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
Set_Pwm_A MACRO
IF FETON_DELAY == 0
cON P_AcomFET
@ -147,7 +138,6 @@ Set_Pwms_Off MACRO
ENDM
;*********************
; PORT 2 definitions *
;*********************
@ -158,12 +148,9 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
;**** **** **** **** ****
; LED configuration
;**** **** **** **** ****
Set_LED_0 MACRO
setb P0.LED_0
ENDM
@ -191,3 +178,10 @@ ENDM
Clear_LED_3 MACRO
ENDM
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_PWM_PHASE, CUSTOM_LED)
$include (Base.inc)

27
targets/R.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -83,28 +84,12 @@ B_pwm EQU 1 ;o
C_pwm EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -115,3 +100,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

27
targets/S.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ A_pwm EQU 1 ;o
A_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -116,3 +101,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

27
targets/T.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -49,9 +53,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -85,28 +86,12 @@ B_com EQU 1 ;o
C_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -117,3 +102,7 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)

44
targets/U.inc

@ -27,9 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -49,9 +51,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU (1 SHL LED_0) + (1 SHL LED_1) + (1 SHL LED_2)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -72,7 +71,6 @@ ELSE
ENDIF
;*********************
; PORT 1 definitions *
;*********************
@ -86,29 +84,12 @@ A_pwm EQU 1 ;o
; EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_LED)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU 00h
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -119,13 +100,9 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**********************
; MCU specific macros *
;**********************
;**** **** **** **** ****
; LED configuration
;**** **** **** **** ****
Set_LED_0 MACRO
clr P0.LED_0
ENDM
@ -155,3 +132,10 @@ ENDM
Clear_LED_3 MACRO
ENDM
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_LED)
$include (Base.inc)

24
targets/V.inc

@ -27,8 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -44,15 +47,11 @@ B_Mux EQU 1 ;i
A_Mux EQU 0 ;i
P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL Comp_Com))
P0_INIT EQU NOT(1 SHL C_com)
P0_PUSHPULL EQU (1 SHL C_com)
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -86,7 +85,6 @@ B_com EQU 1 ;o
C_pwm EQU 0 ;o
P_ApwmFET EQU P1.A_pwm
P_AcomFET EQU P1.A_com
P_BpwmFET EQU P1.B_pwm
@ -94,12 +92,6 @@ P_BcomFET EQU P1.B_com
P_CpwmFET EQU P1.C_pwm
P_CcomFET EQU P0.C_com
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_PWM_PHASE)
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com)
P1_INIT EQU 00h
@ -107,7 +99,6 @@ P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) +
P1_SKIP EQU 0FFh
Set_Pwm_A MACRO
IF FETON_DELAY == 0
cON P_AcomFET
@ -147,8 +138,6 @@ Set_Pwms_Off MACRO
ENDM
;*********************
; PORT 2 definitions *
;*********************
@ -159,3 +148,8 @@ P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_PWM_PHASE)
$include (Base.inc)

22
targets/W.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
;*********************
@ -48,9 +52,6 @@ P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
PCA0_POWER_L EQU PCA0CPL0
@ -82,12 +83,6 @@ C_pwm EQU 4 ;o
; EQU 1 ;i
; EQU 0 ;i
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$set(CUSTOM_PWM_PHASE, CUSTOM_FET_TOGGLING)
$include (Base.inc)
; pwm outputs start as analog in -> floating
; this ensures all mosfet drivers start with floating outputs
@ -180,8 +175,6 @@ Set_Pwms_Off MACRO
ENDM
;*********************
; PORT 2 definitions *
;*********************
@ -190,3 +183,10 @@ DebugPin EQU 0 ;o
P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$set(CUSTOM_PWM_PHASE, CUSTOM_FET_TOGGLING)
$include (Base.inc)

28
targets/Z.inc

@ -27,7 +27,11 @@
;
;**** **** **** **** ****
PWM_ACTIVE_HIGH EQU 0 ; Pwm inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
@ -48,9 +52,6 @@ P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh
PWM_ACTIVE_HIGH EQU 0 ; Pwm inverted
COMPWM_ACTIVE_HIGH EQU 1 ; Damping inverted
IF FETON_DELAY == 0
PCA0_POWER_MODULE EQU PCA0CPM0
@ -84,28 +85,12 @@ A_pwm EQU 1 ;o
A_com EQU 0 ;o
; Note: currently all comparator pins (Comp_ and Mux_) must be on the same port
COMP_PORT EQU 0
$include (Base.inc)
P1_DIGITAL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_INIT EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm)
P1_PUSHPULL EQU (1 SHL A_pwm) + (1 SHL B_pwm) + (1 SHL C_pwm) + (1 SHL A_com) + (1 SHL B_com) + (1 SHL C_com)
P1_SKIP EQU 0FFh
;*********************
; PORT 2 definitions *
;*********************
@ -115,3 +100,8 @@ P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU 0FFh
;**** **** **** **** ****
; Inherit base layout
;**** **** **** **** ****
$include (Base.inc)
Loading…
Cancel
Save