To copy C identifiers directly from a devicetree file:
- Select the string in the file.
-
Right-click the string label.
The context menu appears. -
Click Devicetree: Copy C Identifier.
If the selected symbol has a corresponding C macro, likeDT_PROP(DT_NODELABEL(adc), label), it is copied to the clipboard. If it has more than one macro, a quick pick appears asking you to select one.
A notification confirms that the string has been copied.