Skip to content

Commit

Permalink
Move to init section
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlombardo committed Feb 25, 2024
1 parent 27ad617 commit 7e2710b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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 */

Expand Down Expand Up @@ -452,7 +453,9 @@ void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
start_msb();
for (;;) {

}
/* USER CODE END 5 */
}

Expand Down

0 comments on commit 7e2710b

Please sign in to comment.