Skip to content

Commit

Permalink
got gpio working, convert away from && to & in bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeFreer committed Jul 16, 2024
1 parent 03f8a75 commit 9a6071f
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 38 deletions.
3 changes: 2 additions & 1 deletion firmware/projects/LVIocheckout/inc/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Subsystem {
enable_output_.SetLow();
}

private:
shared::periph::DigitalOutput& enable_output_;

private:
};
2 changes: 1 addition & 1 deletion firmware/projects/LVIocheckout/inc/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace bindings {

extern shared::periph::DigitalOutput&& tsal_en;
extern shared::periph::DigitalOutput&& raspberry_pi_en;
extern shared::periph::DigitalOutput&& front_controller_en;
extern shared::periph::DigitalOutput& front_controller_en;
extern shared::periph::DigitalOutput&& speedgoat_en;
extern shared::periph::DigitalOutput&& accumulator_en;
extern shared::periph::DigitalOutput&& motor_ctrl_precharge_en;
Expand Down
16 changes: 8 additions & 8 deletions firmware/projects/LVIocheckout/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ int main(void) {
bindings::DelayMS(500);
}

bindings::DelayMS(1000);
// bindings::DelayMS(1000);

for (int i = 0; i < 2; i++) {
bindings::front_controller_en.SetHigh();
bindings::DelayMS(1000);
bindings::front_controller_en.SetLow();
bindings::DelayMS(1000);
}
bindings::DelayMS(1000);
// for (int i = 0; i < 2; i++) {
// bindings::front_controller_en.SetHigh();
// bindings::DelayMS(1000);
// bindings::front_controller_en.SetLow();
// bindings::DelayMS(1000);
// }
// bindings::DelayMS(1000);

// bindings::speedgoat_en.SetHigh();
// bindings::motor_ctrl_precharge_en.SetHigh();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ shared::periph::DigitalOutput&& raspberry_pi_en = DigitalOutput{
RASPI_EN_GPIO_Port,
RASPI_EN_Pin,
};
shared::periph::DigitalOutput&& front_controller_en = DigitalOutput{
FRONT_CONTROLLER_EN_GPIO_Port,
FRONT_CONTROLLER_EN_Pin,

DigitalOutput fc{
RED_LED_GPIO_Port, RED_LED_Pin,
// FRONT_CONTROLLER_EN_GPIO_Port,
// FRONT_CONTROLLER_EN_Pin,
};
shared::periph::DigitalOutput& front_controller_en = fc;
shared::periph::DigitalOutput&& speedgoat_en = DigitalOutput{
SPEEDGOAT_EN_GPIO_Port,
SPEEDGOAT_EN_Pin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,40 @@ Mcu.Pin10=PF14
Mcu.Pin11=PF15
Mcu.Pin12=PG0
Mcu.Pin13=PG1
Mcu.Pin14=PG2
Mcu.Pin15=PG3
Mcu.Pin16=PG4
Mcu.Pin17=PG5
Mcu.Pin18=PG6
Mcu.Pin19=PG7
Mcu.Pin14=PB14
Mcu.Pin15=PG2
Mcu.Pin16=PG3
Mcu.Pin17=PG4
Mcu.Pin18=PG5
Mcu.Pin19=PG6
Mcu.Pin2=PC0
Mcu.Pin20=PG8
Mcu.Pin21=PA8
Mcu.Pin22=PA11
Mcu.Pin23=PA12
Mcu.Pin24=PA13
Mcu.Pin25=PA14
Mcu.Pin26=PA15
Mcu.Pin27=PG9
Mcu.Pin28=PG10
Mcu.Pin29=PG11
Mcu.Pin20=PG7
Mcu.Pin21=PG8
Mcu.Pin22=PA8
Mcu.Pin23=PA11
Mcu.Pin24=PA12
Mcu.Pin25=PA13
Mcu.Pin26=PA14
Mcu.Pin27=PA15
Mcu.Pin28=PG9
Mcu.Pin29=PG10
Mcu.Pin3=PC1
Mcu.Pin30=PG12
Mcu.Pin31=PB3
Mcu.Pin32=PB4
Mcu.Pin33=PE0
Mcu.Pin34=PE1
Mcu.Pin35=VP_SYS_VS_Systick
Mcu.Pin36=VP_TIM1_VS_ClockSourceINT
Mcu.Pin37=VP_TIM2_VS_ClockSourceINT
Mcu.Pin30=PG11
Mcu.Pin31=PG12
Mcu.Pin32=PB3
Mcu.Pin33=PB4
Mcu.Pin34=PE0
Mcu.Pin35=PE1
Mcu.Pin36=VP_SYS_VS_Systick
Mcu.Pin37=VP_TIM1_VS_ClockSourceINT
Mcu.Pin38=VP_TIM2_VS_ClockSourceINT
Mcu.Pin4=PC2
Mcu.Pin5=PC3
Mcu.Pin6=PA0/WKUP
Mcu.Pin7=PA4
Mcu.Pin8=PC4
Mcu.Pin9=PC5
Mcu.PinsNb=38
Mcu.PinsNb=39
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F767ZITx
Expand Down Expand Up @@ -115,6 +116,10 @@ PA8.GPIOParameters=GPIO_Label
PA8.GPIO_Label=CAN2_RX
PA8.Locked=true
PA8.Signal=CAN3_RX
PB14.GPIOParameters=GPIO_Label
PB14.GPIO_Label=RED_LED
PB14.Locked=true
PB14.Signal=GPIO_Output
PB3.GPIOParameters=GPIO_Label
PB3.GPIO_Label=JTAG_TDO
PB3.Locked=true
Expand Down

0 comments on commit 9a6071f

Please sign in to comment.