Arduino.h and wiring_digital.c problem.

alvesjc:
Ok ok ok, if I get it right, that means that I'll not need to add the ampersand to "portOutputRegister(digitalPinToPort(13))" as your previous suggestion, because "( &(port->PIO_PDSR) )" will already return that pointer, right?

exactly.

alvesjc:
By the way, can you explain me the meaning of "->"? Or point me to some place to read about it?

when you have a pointer to a structure the "->" operator is used to access a member of the pointed structure. Without this operator you should write something like:

(*PIOA).PIO_PDSR

whete *PIOA is the structure instance pointed by PIOA and .PIO_PDSR is the member selector. You need also the parenthesis because . has higher priority versus *. Since this kind of access is used very often, the C language defines the -> operator so you can write a more concise:

PIOA->PIO_PDSR

if you need more info a google search for "pointer to structure" will give you a lot of articles.