From 74b7d066be12929ecf424c3a822f7db943b23f5d Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Sat, 20 Mar 2021 22:04:40 +0100 Subject: [PATCH] style: Rename pwm/com fet pins --- Layouts/Base.inc | 60 ++++++++++++++++++++++++------------------------ Layouts/C.inc | 18 +++++++-------- Layouts/Q.inc | 18 +++++++-------- Layouts/V.inc | 18 +++++++-------- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Layouts/Base.inc b/Layouts/Base.inc index c8cddee..bb69937 100644 --- a/Layouts/Base.inc +++ b/Layouts/Base.inc @@ -169,16 +169,16 @@ ENDIF $if NOT CUSTOM_PWM_PHASE ; All pwm and complementary pwm pins must be on port 1 to use the base code below -P_ApwmFET EQU P1.A_pwm -P_AcomFET EQU P1.A_com -P_BpwmFET EQU P1.B_pwm -P_BcomFET EQU P1.B_com -P_CpwmFET EQU P1.C_pwm -P_CcomFET EQU P1.C_com +P_A_pwm EQU P1.A_pwm +P_A_com EQU P1.A_com +P_B_pwm EQU P1.B_pwm +P_B_com EQU P1.B_com +P_C_pwm EQU P1.C_pwm +P_C_com EQU P1.C_com Set_Pwm_A MACRO IF DEADTIME == 0 - cON P_AcomFET + cON P_A_com mov P1SKIP, #(NOT (1 SHL A_pwm)) ELSE mov P1SKIP, #(NOT ((1 SHL A_pwm) + (1 SHL A_com))) @@ -187,7 +187,7 @@ ENDM Set_Pwm_B MACRO IF DEADTIME == 0 - cON P_BcomFET + cON P_B_com mov P1SKIP, #(NOT (1 SHL B_pwm)) ELSE mov P1SKIP, #(NOT ((1 SHL B_pwm) + (1 SHL B_com))) @@ -196,7 +196,7 @@ ENDM Set_Pwm_C MACRO IF DEADTIME == 0 - cON P_CcomFET + cON P_C_com mov P1SKIP, #(NOT (1 SHL C_pwm)) ELSE mov P1SKIP, #(NOT ((1 SHL C_pwm) + (1 SHL C_com))) @@ -216,47 +216,47 @@ $endif $if NOT CUSTOM_FET_TOGGLING ApwmFET_on MACRO - pON P_ApwmFET + pON P_A_pwm IF DEADTIME == 0 - cON P_AcomFET + cON P_A_com ENDIF ENDM ApwmFET_off MACRO IF DEADTIME != 0 - pOFF P_ApwmFET + pOFF P_A_pwm ELSE - cOFF P_AcomFET + cOFF P_A_com ENDIF ENDM BpwmFET_on MACRO - pON P_BpwmFET + pON P_B_pwm IF DEADTIME == 0 - cON P_BcomFET + cON P_B_com ENDIF ENDM BpwmFET_off MACRO IF DEADTIME != 0 - pOFF P_BpwmFET + pOFF P_B_pwm ELSE - cOFF P_BcomFET + cOFF P_B_com ENDIF ENDM CpwmFET_on MACRO - pON P_CpwmFET + pON P_C_pwm IF DEADTIME == 0 - cON P_CcomFET + cON P_C_com ENDIF ENDM CpwmFET_off MACRO IF DEADTIME != 0 - pOFF P_CpwmFET + pOFF P_C_pwm ELSE - cOFF P_CcomFET + cOFF P_C_com ENDIF ENDM @@ -269,35 +269,35 @@ ENDM AcomFET_on MACRO IF DEADTIME == 0 - pOFF P_ApwmFET + pOFF P_A_pwm ENDIF - cON P_AcomFET + cON P_A_com ENDM AcomFET_off MACRO - cOFF P_AcomFET + cOFF P_A_com ENDM BcomFET_on MACRO IF DEADTIME == 0 - pOFF P_BpwmFET + pOFF P_B_pwm ENDIF - cON P_BcomFET + cON P_B_com ENDM BcomFET_off MACRO - cOFF P_BcomFET + cOFF P_B_com ENDM CcomFET_on MACRO IF DEADTIME == 0 - pOFF P_CpwmFET + pOFF P_C_pwm ENDIF - cON P_CcomFET + cON P_C_com ENDM CcomFET_off MACRO - cOFF P_CcomFET + cOFF P_C_com ENDM All_comFETs_Off MACRO diff --git a/Layouts/C.inc b/Layouts/C.inc index e736fe4..80b8e3c 100644 --- a/Layouts/C.inc +++ b/Layouts/C.inc @@ -101,16 +101,16 @@ P2_SKIP EQU 0FFh ;**** **** **** **** **** ; PWM Phase ;**** **** **** **** **** -P_ApwmFET EQU P0.A_pwm -P_AcomFET EQU P0.A_com -P_BpwmFET EQU P1.B_pwm -P_BcomFET EQU P1.B_com -P_CpwmFET EQU P1.C_pwm -P_CcomFET EQU P1.C_com +P_A_pwm EQU P0.A_pwm +P_A_com EQU P0.A_com +P_B_pwm EQU P1.B_pwm +P_B_com EQU P1.B_com +P_C_pwm EQU P1.C_pwm +P_C_com EQU P1.C_com Set_Pwm_A MACRO IF DEADTIME == 0 - cON P_AcomFET + cON P_A_com mov P0SKIP, #(NOT (1 SHL A_pwm)) mov P1SKIP, #0FFh ELSE @@ -121,7 +121,7 @@ ENDM Set_Pwm_B MACRO IF DEADTIME == 0 - cON P_BcomFET + cON P_B_com mov P0SKIP, #0FFh mov P1SKIP, #(NOT (1 SHL B_pwm)) ELSE @@ -132,7 +132,7 @@ ENDM Set_Pwm_C MACRO IF DEADTIME == 0 - cON P_CcomFET + cON P_C_com mov P0SKIP, #0FFh mov P1SKIP, #(NOT (1 SHL C_pwm)) ELSE diff --git a/Layouts/Q.inc b/Layouts/Q.inc index fcdb49c..63878f7 100644 --- a/Layouts/Q.inc +++ b/Layouts/Q.inc @@ -101,16 +101,16 @@ P2_SKIP EQU 0FFh ;**** **** **** **** **** ; PWM Phase ;**** **** **** **** **** -P_ApwmFET EQU P0.A_pwm -P_AcomFET EQU P1.A_com -P_BpwmFET EQU P0.B_pwm -P_BcomFET EQU P1.B_com -P_CpwmFET EQU P0.C_pwm -P_CcomFET EQU P1.C_com +P_A_pwm EQU P0.A_pwm +P_A_com EQU P1.A_com +P_B_pwm EQU P0.B_pwm +P_B_com EQU P1.B_com +P_C_pwm EQU P0.C_pwm +P_C_com EQU P1.C_com Set_Pwm_A MACRO IF DEADTIME == 0 - cON P_AcomFET + cON P_A_com mov P0SKIP, #(NOT (1 SHL A_pwm)) mov P1SKIP, #0FFh ELSE @@ -121,7 +121,7 @@ ENDM Set_Pwm_B MACRO IF DEADTIME == 0 - cON P_BcomFET + cON P_B_com mov P0SKIP, #(NOT (1 SHL B_pwm)) mov P1SKIP, #0FFh ELSE @@ -132,7 +132,7 @@ ENDM Set_Pwm_C MACRO IF DEADTIME == 0 - cON P_CcomFET + cON P_C_com mov P0SKIP, #(NOT (1 SHL C_pwm)) mov P1SKIP, #0FFh ELSE diff --git a/Layouts/V.inc b/Layouts/V.inc index 5d44193..8df8337 100644 --- a/Layouts/V.inc +++ b/Layouts/V.inc @@ -101,16 +101,16 @@ P2_SKIP EQU 0FFh ;**** **** **** **** **** ; PWM Phase ;**** **** **** **** **** -P_ApwmFET EQU P1.A_pwm -P_AcomFET EQU P1.A_com -P_BpwmFET EQU P1.B_pwm -P_BcomFET EQU P1.B_com -P_CpwmFET EQU P1.C_pwm -P_CcomFET EQU P0.C_com +P_A_pwm EQU P1.A_pwm +P_A_com EQU P1.A_com +P_B_pwm EQU P1.B_pwm +P_B_com EQU P1.B_com +P_C_pwm EQU P1.C_pwm +P_C_com EQU P0.C_com Set_Pwm_A MACRO IF DEADTIME == 0 - cON P_AcomFET + cON P_A_com mov P0SKIP, #0FFh mov P1SKIP, #(NOT (1 SHL A_pwm)) ELSE @@ -121,7 +121,7 @@ ENDM Set_Pwm_B MACRO IF DEADTIME == 0 - cON P_BcomFET + cON P_B_com mov P0SKIP, #0FFh mov P1SKIP, #(NOT (1 SHL B_pwm)) ELSE @@ -132,7 +132,7 @@ ENDM Set_Pwm_C MACRO IF DEADTIME == 0 - cON P_CcomFET + cON P_C_com mov P0SKIP, #0FFh mov P1SKIP, #(NOT (1 SHL C_pwm)) ELSE