Update freertos.c for new board
This commit is contained in:
+20
-9
@@ -25,24 +25,35 @@ void MX_FREERTOS_Init(void) {
|
||||
|
||||
void StartDefaultTask(void *argument)
|
||||
{
|
||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||
|
||||
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_15, GPIO_PIN_RESET);
|
||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||
|
||||
// GPIOB init
|
||||
{
|
||||
GPIO_InitTypeDef is = {0};
|
||||
is.Pin = GPIO_PIN_15;
|
||||
is.Pin = GPIO_PIN_15 | GPIO_PIN_14 | GPIO_PIN_13 | GPIO_PIN_12;
|
||||
is.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
is.Pull = GPIO_NOPULL;
|
||||
is.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOD, &is);
|
||||
HAL_GPIO_Init(GPIOB, &is);
|
||||
}
|
||||
|
||||
for(;;)
|
||||
{
|
||||
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_15, GPIO_PIN_RESET);
|
||||
osDelay(1000);
|
||||
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_15, GPIO_PIN_SET);
|
||||
osDelay(1000);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, GPIO_PIN_SET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_SET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, GPIO_PIN_SET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_SET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, GPIO_PIN_RESET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_14, GPIO_PIN_RESET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_13, GPIO_PIN_RESET);
|
||||
osDelay(100);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, GPIO_PIN_RESET);
|
||||
osDelay(100);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user