To assign a node to a pin, complete the following steps:
- Open the Pins View using the switch at the bottom right corner of the Editor.
- Click the pin to which you want to assign a node.
The Pin Overview is updated.
- Click the Add Assignment button.
The assignment menu appears.
- Select the options for the node from the available menu fields.
- Click Assign.
The extension assigns the pin to the node if it is possible. Otherwise, a warning is displayed and the assignment is cancelled. -
If the assignment was successful, complete the following steps:
- Check for any assignment issues in the Problems panel in the Visual Studio Code's Panel Views.
For example, if the Problems panel shows information about a pin assignment being ineffective because a GPIO controller is disabled, enable that GPIO port. You can enable it from the Nodes View, or by clicking Enable on the PWM peripheral tile. - Save your changes either in the editor or in the devicetree file.
The node is assigned to the chosen pin and the change is mirrored in the devicetree code file. You can hover over the pin in the Pins View to see the tooltip with the list of available assignments, including the respective node, function, and state.
- Check for any assignment issues in the Problems panel in the Visual Studio Code's Panel Views.