Skip to content

Commit

Permalink
Added AUX2
Browse files Browse the repository at this point in the history
  • Loading branch information
vedderb committed Aug 17, 2024
1 parent 05ff748 commit a711b02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hwconf/vesc/str365/hw_str365_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ void hw_init_gpio(void) {

// AUX pin
AUX_OFF();
palSetPadMode(AUX_GPIO, AUX_PIN,
PAL_MODE_OUTPUT_PUSHPULL |
PAL_STM32_OSPEED_HIGHEST);
palSetPadMode(AUX_GPIO, AUX_PIN, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
AUX2_OFF();
palSetPadMode(AUX2_GPIO, AUX2_PIN, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);

// ADC Pins
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT_ANALOG);
Expand Down
5 changes: 5 additions & 0 deletions hwconf/vesc/str365/hw_str365_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
#define AUX_ON() palSetPad(AUX_GPIO, AUX_PIN)
#define AUX_OFF() palClearPad(AUX_GPIO, AUX_PIN)

#define AUX2_GPIO GPIOC
#define AUX2_PIN 13
#define AUX2_ON() palSetPad(AUX2_GPIO, AUX2_PIN)
#define AUX2_OFF() palClearPad(AUX2_GPIO, AUX2_PIN)

// Shutdown pin
#define HW_SHUTDOWN_GPIO GPIOC
#define HW_SHUTDOWN_PIN 5
Expand Down

0 comments on commit a711b02

Please sign in to comment.