Browse Source

Temporary for my wrongly design chip which needs to 180 degree rotate the MOSFET

temporary
Englebert 3 years ago
parent
commit
5167f7d35c
  1. 56
      BLHeli_S SiLabs/O.inc

56
BLHeli_S SiLabs/O.inc

@ -318,12 +318,12 @@ ENDM
;********************* ;*********************
; EQU 7 ;i ; EQU 7 ;i
; EQU 6 ;i ; EQU 6 ;i
CcomFET EQU 5 ;o
CpwmFET EQU 4 ;o
BcomFET EQU 3 ;o
BpwmFET EQU 2 ;o
AcomFET EQU 1 ;o
ApwmFET EQU 0 ;o
CcomFET EQU 4 ;o
CpwmFET EQU 5 ;o
BcomFET EQU 2 ;o
BpwmFET EQU 3 ;o
AcomFET EQU 0 ;o
ApwmFET EQU 1 ;o
P1_DIGITAL EQU (1 SHL ApwmFET)+(1 SHL BpwmFET)+(1 SHL CpwmFET)+(1 SHL AcomFET)+(1 SHL BcomFET)+(1 SHL CcomFET) P1_DIGITAL EQU (1 SHL ApwmFET)+(1 SHL BpwmFET)+(1 SHL CpwmFET)+(1 SHL AcomFET)+(1 SHL BcomFET)+(1 SHL CcomFET)
P1_INIT EQU (1 SHL AcomFET)+(1 SHL BcomFET)+(1 SHL CcomFET) P1_INIT EQU (1 SHL AcomFET)+(1 SHL BcomFET)+(1 SHL CcomFET)
@ -332,41 +332,41 @@ P1_SKIP EQU 3Fh
ApwmFET_on MACRO ApwmFET_on MACRO
setb P1.ApwmFET setb P1.ApwmFET
IF FETON_DELAY == 0
clr P1.AcomFET
IF fetoN_DELAY == 0
setb P1.AcomFET
ENDIF ENDIF
ENDM ENDM
ApwmFET_off MACRO ApwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
clr P1.ApwmFET clr P1.ApwmFET
ELSE ELSE
setb P1.AcomFET
clr P1.AcomFET
ENDIF ENDIF
ENDM ENDM
BpwmFET_on MACRO BpwmFET_on MACRO
setb P1.BpwmFET setb P1.BpwmFET
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.BcomFET
setb P1.BcomFET
ENDIF ENDIF
ENDM ENDM
BpwmFET_off MACRO BpwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
clr P1.BpwmFET clr P1.BpwmFET
ELSE ELSE
setb P1.BcomFET
clr P1.BcomFET
ENDIF ENDIF
ENDM ENDM
CpwmFET_on MACRO CpwmFET_on MACRO
setb P1.CpwmFET setb P1.CpwmFET
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.CcomFET
setb P1.CcomFET
ENDIF ENDIF
ENDM ENDM
CpwmFET_off MACRO CpwmFET_off MACRO
IF FETON_DELAY != 0 IF FETON_DELAY != 0
clr P1.CpwmFET clr P1.CpwmFET
ELSE ELSE
setb P1.CcomFET
clr P1.CcomFET
ENDIF ENDIF
ENDM ENDM
All_pwmFETs_Off MACRO All_pwmFETs_Off MACRO
@ -375,9 +375,9 @@ IF FETON_DELAY != 0
clr P1.BpwmFET clr P1.BpwmFET
clr P1.CpwmFET clr P1.CpwmFET
ELSE ELSE
setb P1.AcomFET
setb P1.BcomFET
setb P1.CcomFET
clr P1.AcomFET
clr P1.BcomFET
clr P1.CcomFET
ENDIF ENDIF
ENDM ENDM
@ -385,38 +385,38 @@ AcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.ApwmFET clr P1.ApwmFET
ENDIF ENDIF
clr P1.AcomFET
setb P1.AcomFET
ENDM ENDM
AcomFET_off MACRO AcomFET_off MACRO
setb P1.AcomFET
clr P1.AcomFET
ENDM ENDM
BcomFET_on MACRO BcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.BpwmFET clr P1.BpwmFET
ENDIF ENDIF
clr P1.BcomFET
setb P1.BcomFET
ENDM ENDM
BcomFET_off MACRO BcomFET_off MACRO
setb P1.BcomFET
clr P1.BcomFET
ENDM ENDM
CcomFET_on MACRO CcomFET_on MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.CpwmFET clr P1.CpwmFET
ENDIF ENDIF
clr P1.CcomFET
setb P1.CcomFET
ENDM ENDM
CcomFET_off MACRO CcomFET_off MACRO
setb P1.CcomFET
clr P1.CcomFET
ENDM ENDM
All_comFETs_Off MACRO All_comFETs_Off MACRO
setb P1.AcomFET
setb P1.BcomFET
setb P1.CcomFET
clr P1.AcomFET
clr P1.BcomFET
clr P1.CcomFET
ENDM ENDM
Set_Pwm_A MACRO Set_Pwm_A MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.AcomFET
set P1.AcomFET
mov P1SKIP, #3Eh mov P1SKIP, #3Eh
ELSE ELSE
mov P1SKIP, #3Ch mov P1SKIP, #3Ch
@ -424,7 +424,7 @@ ENDIF
ENDM ENDM
Set_Pwm_B MACRO Set_Pwm_B MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.BcomFET
set P1.BcomFET
mov P1SKIP, #3Bh mov P1SKIP, #3Bh
ELSE ELSE
mov P1SKIP, #33h mov P1SKIP, #33h
@ -432,7 +432,7 @@ ENDIF
ENDM ENDM
Set_Pwm_C MACRO Set_Pwm_C MACRO
IF FETON_DELAY == 0 IF FETON_DELAY == 0
clr P1.CcomFET
set P1.CcomFET
mov P1SKIP, #2Fh mov P1SKIP, #2Fh
ELSE ELSE
mov P1SKIP, #0Fh mov P1SKIP, #0Fh

Loading…
Cancel
Save