Skip to main content
Chris_student
Associate II
October 11, 2023
Solved

lsm303dlhc.c

  • October 11, 2023
  • 1 reply
  • 2972 views

Hey st i am working with the stm32f407g and i am trying to make the LSM303 working on my board. At this moment i am using this lib: https://github.com/STMicroelectronics/STM32CubeL4/blob/master/Drivers/BSP/Components/lsm303dlhc/lsm303dlhc.c
The problem i am having is that it cant find the COMPASSACCELERO_IO_WRITE function and the COMPASSACCELERO_IO_Init function. I think this is because i am missing a .A or .LIB. Could i get help with this?

This topic has been closed for replies.
Best answer by MikaelM

hello @Chris_student 

You could find what you want here (function definition):
https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/BSP/STM32F401-Discovery/stm32f401_discovery.c

MikaelM_0-1697025581926.png

As you are using F4 devices, you could find information into the F4 discovery board BSP.

Best regards

Mikael

1 reply

Foued_KH
ST Employee
October 11, 2023

Hello @Chris_student , 

Did you add the .h file into your project ?

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Chris_student
Associate II
October 11, 2023

I did but it did not work, i added these 3 libs because they are needed and made sure the path was right but it wont work. when i open the declaration of COMPASSACCELERO_IO_WRITE i get passed to the .h file so thats good but i can not find the function it self enywhere. because as far as i know there should be a function of COMPASSACCELERO_IO_WRITE with code in it. But this is no where to be found.
(COMPASSACCELERO_IO_WRITE is a function that gets called by multiple functions in the .c file)

Chris_student_0-1697018774309.png

 

MikaelM
MikaelMBest answer
ST Employee
October 11, 2023

hello @Chris_student 

You could find what you want here (function definition):
https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/BSP/STM32F401-Discovery/stm32f401_discovery.c

MikaelM_0-1697025581926.png

As you are using F4 devices, you could find information into the F4 discovery board BSP.

Best regards

Mikael

If you feel a post has answered your question, please click Accept as Solution.