cancel
Showing results for 
Search instead for 
Did you mean: 

1. WHERE TO FIND assert_param() FUNCTION TO UNDERSTAND HOW IT WORKS. 2. HOW THE MODIFY_REG() FUNCTION WORKS?

WM_IR
Senior

I have 2 questions:

Based on the function below, where do I find the assert_param function? because I want to know how it works.

At the update CR2 register, how the function works? because I confuse why there is a \ symbol and when I try to find where is the function, I could not find it. Is there any reference that I can refer to?0693W00000QKRr1QAH.jpg

3 REPLIES 3
Andrew Neil
Evangelist III

"where do I find the assert_param function?"

Use your IDE's 'Go To Definition' feature.

"I confuse why there is a \ symbol"

That is standard C syntax for a line continuation within a macro definition

It's not strictly necessary here (as it's not the macro definition), but does no harm.

0693W000008xsqBQAQ.png

I use STM32CubeIDE and right click, select Open Declaration should bring me to the function. Unfortunately, It does not bring me anywhere. But when I select other functions, It will bring me to the respective functions.

About the question, do you have any links that I can refer to? I want to see some examples also on this matter.

@WM_IR​ "Open Declaration should bring me to the function"

Indeed it should

"Unfortunately, It does not"

Maybe it's disable by a compilation option?

Cube documentation: https://www.st.com/en/development-tools/stm32cubeide.html#documentation

ST's YouTube channel: https://www.youtube.com/c/stmicroelectronics

ST's Online training ("MOOC"): https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/STM32CubeIDE_basics_MOOC.html

Note also that STM32CubeIDE is built on Eclipse - so general Eclipse resources will also cover general features like this ...