How to find out the address of LED?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-07 2: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)".
- Labels:
-
STM32CubeMX
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-07 2: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-07 2:55 AM
Thank you for answer! Then how can I find out the condition of LED with Modbus?
I need to specify the start address in the simulator Modbus master.
see screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-01-07 4:42 AM
You need some task in your controller that read the LED state and translates it to Modbus.
