How to access hardware peripheral handles in `app_threadx.c` and other files
Hi,
How would one go about giving access to hardware handles in source files other than `main.c`? For instance, the ADC state is stored in a struct called `hadc3` in `main.c`, without an access modifier. I would assume that this is extern by default, but the linker doesn't pick it up when referencing from any other source file. Instead, I get something like:

For reference I am trying to initialize and control a peripheral from a ThreadX thread. Something like:
VOID tbw_thread_entry(ULONG initial_input) {
HAL_ADC_Start(&hadc3);
while (1) {
HAL_ADC_PollForConversion(&hadc3, 20);
int adc_value = HAL_ADC_GetValue(&hadc3);
HAL_UART_Transmit(&huart2, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY);
sprintf(msg, "Light: %hu \r\n", adc_read);
HAL_GPIO_TogglePin(GPIOE, 0x0002);
tx_thread_sleep(20);
}
If there is a better way to show code please let me know. As an additional question, in trying to access `HAL_MAX_DELAY` by including `stm32h7xx_hal_def.h`, I get tons of compiler errors:

