use a hal function outside main
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-10-28 3:55 AM
Posted on October 28, 2017 at 12:55

dear Community,
i should to use some HAL functions outside the main.c
i add &sharpinclude ''stm32f4xx_hal.h'' to another c file but error appears for example for SPI:
regards, Ras
#hal #outside-main.c
Labels:
- Labels:
-
STM32Cube MCU Packages
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-10-28 4:26 AM
Posted on October 28, 2017 at 13:26
Hello !
use ater include :
#include 'stm32f4xx_hal.h'
extern SPI_HandleTypeDef hspi5;
or
extern 'C' {SPI_HandleTypeDef hspi5;}// in case your module is a c++ module.
regards
vf
