Skip to content

Instantly share code, notes, and snippets.

GPIO

First you have to generate initialization code using pin configuration tool:

  1. Go to the configuration tab.
  2. Ensure you have selected the correct project.
  3. If you need only LED or Buttons select a appropriate pin function group from dropdown menu.
  4. Ensure the pin function group is enabled (the flag next to the dropdown menu should be filled).
  5. If you are adding pins, make sure the pins are set as GPIO, have correct direction and initial value.
  6. Click on "Update Code" button.

To find macros corresponding to your pins visit board/pin_mux.h file in the project structure.

@Northeus
Northeus / .cs
Created April 27, 2023 12:54
C# - task race condition
using System;
using System.Threading.Tasks;
using System.Linq;
public class Test
{
public int x;
public static async Task Main(string[] args)
{