Direct port access in Arduino IDE

Hello s.micic,

sorry for the late response, was quite busy at work … Anyhow, I’ll paste my code below, as mentioned in the original post I want to modify the duty cylce of an incoming PWM signal while keeping its frequency constant. You will find both methods (“Arduino style” and “fast style”) for setting the GPIO pin.

If you are using the Arduino IDE you can also have a look at “wiring_digital.c” which can be found under “AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.9\cores\arduino”

Hope this helps,
Stefan