Skip to content

Commit

Permalink
pdu pin init update (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeOxley authored Jan 30, 2024
1 parent d4790b5 commit 9fb5891
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source/pdu/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ GPIOInitConfig_t gpio_config[] = {
GPIO_INIT_INPUT(FAN_2_NFLT_GPIO_Port, FAN_2_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
GPIO_INIT_ANALOG(FAN_2_CS_GPIO_Port, FAN_2_CS_Pin),
// Main Module
GPIO_INIT_OUTPUT(MAIN_CTRL_GPIO_Port, MAIN_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
// Disable software control GPIO_INIT_OUTPUT(MAIN_CTRL_GPIO_Port, MAIN_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_INPUT(MAIN_NFLT_GPIO_Port, MAIN_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
GPIO_INIT_ANALOG(MAIN_CS_GPIO_Port, MAIN_CS_Pin),
// Dashboard
GPIO_INIT_OUTPUT(DASH_CTRL_GPIO_Port, DASH_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
// Disable software control GPIO_INIT_OUTPUT(DASH_CTRL_GPIO_Port, DASH_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_INPUT(DASH_NFLT_GPIO_Port, DASH_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
GPIO_INIT_ANALOG(DASH_CS_GPIO_Port, DASH_CS_Pin),
// ABox
GPIO_INIT_OUTPUT(ABOX_CTRL_GPIO_Port, ABOX_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
// Disable software control GPIO_INIT_OUTPUT(ABOX_CTRL_GPIO_Port, ABOX_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_INPUT(ABOX_NFLT_GPIO_Port, ABOX_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
GPIO_INIT_ANALOG(ABOX_CS_GPIO_Port, ABOX_CS_Pin),
// Bullet
GPIO_INIT_OUTPUT(BLT_CTRL_GPIO_Port, BLT_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_INPUT(BLT_NFLT_GPIO_Port, BLT_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
// 5V Critical Switch
GPIO_INIT_OUTPUT(CRIT_5V_CTRL_GPIO_Port, CRIT_5V_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
// Disable software control GPIO_INIT_OUTPUT(CRIT_5V_CTRL_GPIO_Port, CRIT_5V_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
GPIO_INIT_INPUT(CRIT_5V_NFLT_GPIO_Port, CRIT_5V_NFLT_Pin, GPIO_INPUT_OPEN_DRAIN),
// 5V Non-Critical Switch
GPIO_INIT_OUTPUT(NCRIT_5V_CTRL_GPIO_Port, NCRIT_5V_CTRL_Pin, GPIO_OUTPUT_LOW_SPEED),
Expand Down Expand Up @@ -170,6 +170,10 @@ int main()
{
HardFault_Handler();
}

PHAL_writeGPIO(SDC_CTRL_GPIO_Port, SDC_CTRL_Pin, 1);
PHAL_writeGPIO(DAQ_CTRL_GPIO_Port, DAQ_CTRL_Pin, 1);

PHAL_writeGPIO(LED_CTRL_BLANK_GPIO_Port, LED_CTRL_BLANK_Pin, 1);


Expand Down

0 comments on commit 9fb5891

Please sign in to comment.