2022-01-07 02:35 AM
I'm studying a Modbus...
And i wanna to check my code and I want to check the condition of pin PC13 (LED).
How to find out the address of pin C13?
If this line
printf("Address of variable LED is: %p\r\n", &LED);
say to me error "'LED' undeclared (first use in this function)".
2022-01-07 02:48 AM
There is no address of the LED, LED is connected to a GPIO pins and LED is a define not an address. This define is than argument to several function that manipulate the state of the LED.
2022-01-07 02:55 AM
2022-01-07 04:42 AM
You need some task in your controller that read the LED state and translates it to Modbus.