Solved
((HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_10) == GPIO_PIN_SET) ? 1:0); I am using this command to read a pin, Actually it is Arduino format. So I want to ask if this works in ST as well and if the same syntax work does it read both 1 and 0?
..
..
Welcome, @SRehm.2, to the community!
We're sorry that the answer took a little while to come:
The condition mentioned is called a ternary operator, not specific to Arduino, which is based on C++, but also available in C. If you wanted to use this for the assignment to a variable, you can use it exactly like this.
Does it answer your question?
Regards
/Peter
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.