Skip to content

Commit

Permalink
Initial pass with the formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
stylesuxx committed May 21, 2023
1 parent d741076 commit 9106a37
Show file tree
Hide file tree
Showing 41 changed files with 4,812 additions and 5,031 deletions.
756 changes: 374 additions & 382 deletions src/BLHeliBootLoad.inc

Large diffs are not rendered by default.

1,529 changes: 759 additions & 770 deletions src/Bluejay.asm

Large diffs are not rendered by default.

97 changes: 46 additions & 51 deletions src/Layouts/A.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,83 +29,78 @@
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****

PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 1 ; Damping inverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 1 ; Damping inverted

COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted
COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted

IF DEADTIME == 0
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0

PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
ELSE
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0

PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
ENDIF


;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 0 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
RTX_PIN EQU 5
; EQU 4
C_Mux EQU 3
B_Mux EQU 2
A_Mux EQU 1
V_Mux EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

; EQU 7
; EQU 6
RTX_PIN EQU 5
; EQU 4
C_Mux EQU 3
B_Mux EQU 2
A_Mux EQU 1
V_Mux EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 1 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
C_Com EQU 5
C_Pwm EQU 4
B_Com EQU 3
B_Pwm EQU 2
A_Com EQU 1
A_Pwm EQU 0


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

; EQU 7
; EQU 6
C_Com EQU 5
C_Pwm EQU 4
B_Com EQU 3
B_Pwm EQU 2
A_Com EQU 1
A_Pwm EQU 0

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
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU (1 SHL DebugPin)
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU (1 SHL DebugPin)

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
Expand Down
97 changes: 46 additions & 51 deletions src/Layouts/B.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,83 +29,78 @@
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****

PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 1 ; Damping inverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 1 ; Damping inverted

COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted
COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted

IF DEADTIME == 0
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0

PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
ELSE
PCA0CPM_POWER EQU PCA0CPM1
PCA0CPL_POWER EQU PCA0CPL1
PCA0CPH_POWER EQU PCA0CPH1
PCA0CPM_POWER EQU PCA0CPM1
PCA0CPL_POWER EQU PCA0CPL1
PCA0CPH_POWER EQU PCA0CPH1

PCA0CPM_DAMP EQU PCA0CPM0
PCA0CPL_DAMP EQU PCA0CPL0
PCA0CPH_DAMP EQU PCA0CPH0
PCA0CPM_DAMP EQU PCA0CPM0
PCA0CPL_DAMP EQU PCA0CPL0
PCA0CPH_DAMP EQU PCA0CPH0
ENDIF


;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 0 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
RTX_PIN EQU 5
; EQU 4
C_Mux EQU 3
B_Mux EQU 2
A_Mux EQU 1
V_Mux EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

; EQU 7
; EQU 6
RTX_PIN EQU 5
; EQU 4
C_Mux EQU 3
B_Mux EQU 2
A_Mux EQU 1
V_Mux EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 1 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
A_Pwm EQU 5
A_Com EQU 4
B_Pwm EQU 3
B_Com EQU 2
C_Pwm EQU 1
C_Com EQU 0


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

; EQU 7
; EQU 6
A_Pwm EQU 5
A_Com EQU 4
B_Pwm EQU 3
B_Com EQU 2
C_Pwm EQU 1
C_Com EQU 0

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
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU (1 SHL DebugPin)
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
P2_SKIP EQU (1 SHL DebugPin)

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
Expand Down
82 changes: 39 additions & 43 deletions src/Layouts/BB51/A.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,71 +29,67 @@
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****

PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 0 ; Damping non-inverted
PWM_ACTIVE_HIGH EQU 1 ; Pwm non-inverted
COM_ACTIVE_HIGH EQU 0 ; Damping non-inverted

COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted
COMPARATOR_PORT EQU 0 ; All comparator (mux) pins must be on the same port
COMPARATOR_INVERT EQU 0 ; Comparator output non-inverted

PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0

PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1
PCA0CPM_POWER EQU PCA0CPM0
PCA0CPL_POWER EQU PCA0CPL0
PCA0CPH_POWER EQU PCA0CPH0

PCA0CPM_DAMP EQU PCA0CPM1
PCA0CPL_DAMP EQU PCA0CPL1
PCA0CPH_DAMP EQU PCA0CPH1

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 0 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
RTX_PIN EQU 5
V_Mux EQU 4
A_Mux EQU 3
C_Mux EQU 2
B_Mux EQU 1
; EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

; EQU 7
; EQU 6
RTX_PIN EQU 5
V_Mux EQU 4
A_Mux EQU 3
C_Mux EQU 2
B_Mux EQU 1
; EQU 0

P0_DIGITAL EQU NOT((1 SHL A_Mux) + (1 SHL B_Mux) + (1 SHL C_Mux) + (1 SHL V_Mux))
P0_INIT EQU 0FFh
P0_PUSHPULL EQU 0
P0_SKIP EQU 0FFh

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
; PORT 1 definitions
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
; EQU 7
; EQU 6
C_Com EQU 5
C_Pwm EQU 4
B_Com EQU 3
B_Pwm EQU 2
A_Com EQU 1
A_Pwm EQU 0

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) ; Active low com fets
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

; EQU 7
; EQU 6
C_Com EQU 5
C_Pwm EQU 4
B_Com EQU 3
B_Pwm EQU 2
A_Com EQU 1
A_Pwm EQU 0

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) ; Active low com fets
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
;
;**** **** **** **** **** **** **** **** **** **** **** **** ****
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)
DebugPin EQU 0

P2_DIGITAL EQU (1 SHL DebugPin)
P2_PUSHPULL EQU (1 SHL DebugPin)

;**** **** **** **** **** **** **** **** **** **** **** **** ****
;
Expand Down
Loading

0 comments on commit 9106a37

Please sign in to comment.