Port Mapping on the Arduino Due

I scrapped trying to figure out how to change the timers of the AnalogWrite function on Pins 10 and 11 and rather oppted to use the DueTimer.h libary and call an interrupt that does my own PWM. However I have a small problem as the time that it takes to switch a digital pin takes to long. I need to do port manuipulation. However I can not find anything on the Due. Can some one help please?

All I need to do is replace DigitalWrite with a line of port manipulation for High and low on pins 8,9,10 and 11.

I know that PC22->Digital Pin 8 PC21-> Digital Pin 9 PC29->Digital Pin 10 PD7-> Digital Pin 11

So I need to change those pins' Output but I do not know how... If you could just give me an example I'd be super greatful

Thanks

Even if you can just tell me where to look in the datasheet that would help a lot...

Look in
/hardware/arduino/sam/variants/arduino_due_x/variant.cpp
/hardware/arduino/sam/variants/arduino_due_x/variant.h
/hardware/arduino/sam/variants/arduino_due_x/pins_arduino.h

The variants directory contains the chip-specific pin mappings etc.

Hi,

Take a look at my other Library called "ArduinoSensors". It has one class named DigitalOut, that implements fast IO on Due boards, and switch automatically to digitalWrite on others:

ArduinoSensors Library: https://github.com/ivanseidel/ArduinoSensors DigitalOut at ArduinoSensors: https://github.com/ivanseidel/ArduinoSensors/blob/master/DigitalOut.h#L79-L86

Ivan