Skip to content

Commit

Permalink
make fix genericusing hardware description macros
Browse files Browse the repository at this point in the history
  • Loading branch information
houkhouk authored and nicolas-rabault committed Feb 2, 2024
1 parent fb10344 commit 4ccd883
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions examples/projects/NUCLEO-G431KB/gate_serialcom/src/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/* Includes ------------------------------------------------------------------*/
#include "gpio.h"
#include "robus_hal_config.h"

/* USER CODE BEGIN 0 */

Expand Down Expand Up @@ -59,14 +60,20 @@ void MX_GPIO_Init(void)
HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct);

/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5;
GPIO_InitStruct.Pin = PTPA_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
HAL_GPIO_Init(PTPA_PORT, &GPIO_InitStruct);

HAL_GPIO_WritePin(GPIOB, GPIO_PIN_4, RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, RESET);
GPIO_InitStruct.Pin = PTPB_PIN;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(PTPB_PORT, &GPIO_InitStruct);

HAL_GPIO_WritePin(PTPA_PORT, PTPA_PIN, RESET);
HAL_GPIO_WritePin(PTPB_PORT, PTPB_PIN, RESET);
}

/* USER CODE BEGIN 2 */
Expand Down

0 comments on commit 4ccd883

Please sign in to comment.