From 7e2710be4456c800038c4144eed332a8b7f37b3a Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 25 Feb 2024 12:23:22 -0500 Subject: [PATCH] Move to init section --- Core/Src/main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Core/Src/main.c b/Core/Src/main.c index 0e71b42..4743245 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -97,6 +97,14 @@ int main(void) /* USER CODE BEGIN Init */ + msb_temp_t *msb_temp= malloc(sizeof(msb_temp_t)); + msb_knuckle_t *msb_knuckle = malloc(sizeof(msb_knuckle_t)); + msb_central_t *msb_central = malloc(sizeof(msb_central_t)); + + msb_temp->id = BOARD_ID; + msb_knuckle->id = BOARD_ID; + msb_central->id = BOARD_ID; + /* USER CODE END Init */ /* Configure the system clock */ @@ -114,13 +122,6 @@ int main(void) MX_USART2_UART_Init(); /* USER CODE BEGIN 2 */ - msb_temp_t *msb_temp= malloc(sizeof(msb_temp_t)); - msb_knuckle_t *msb_knuckle = malloc(sizeof(msb_knuckle_t)); - msb_central_t *msb_central = malloc(sizeof(msb_central_t)); - - msb_temp->id = BOARD_ID; - msb_knuckle->id = BOARD_ID; - msb_central->id = BOARD_ID; /* USER CODE END 2 */ @@ -452,7 +453,9 @@ void StartDefaultTask(void *argument) { /* USER CODE BEGIN 5 */ /* Infinite loop */ - start_msb(); + for (;;) { + + } /* USER CODE END 5 */ }