How on earth do you include a C file and its header file?
It is so unbelievably, ridiculously, and possibly impossible to do something as simple as just including a folder that has a C file and its header into my project and having it actually importable in my main.c.
I’m trying to simply modify this project: http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-sns-allmems1.html?ecmp=tt4023_gl_enews_aug2016
I’m using the STM32L476G Nucleo project and I’m trying include the cross-platform LIS3DH drivers into the project http://www.st.com/content/st_com/en/products/embedded-software/mems-and-sensors-software/drivers-for-mems/stsw-mems006.html
While trying to implement the LIS3DH driver read and write functions in I2C, I’m trying to get my lis3dh_driver.c to be able to include
- include “stm32l4xx_hal_i2c.h”
- include “lis3dh_driver.h”
But I am just simply left with tons of errors saying that MEMS_ERROR cannot be resolved, which is weird because lis3dh_driver.h has that defined and random HAL I2C errors like “expected ‘,’ or ‘;’ before ‘HAL_FLASHEx_DisableRunPowerDown’.
What do I need to do to get main.c to be able to see lis3dh_driver.h, and get lis3dh_driver.c to see lis3dh_driver.h and stm32l4xx_hal_i2c.h?