Faster alternative to digitalWrite


#1

Is there similar way to control IO ports by manipulating the port registers directly as there is with Arduino boards with Arduino IDE?

See Arduino example here: https://www.arduino.cc/en/Reference/PortManipulation

More information about different methods ( for arduino ):

EDIT:

Okay, I actually did some digging and found this:

This is the implementation of digitalWrite:

void digitalWrite(uint32_t pin, uint32_t value)
{
PinName nrf_pin;

nrf_pin = Pin_nRF51822_to_Arduino(pin);
MBED_ASSERT(nrf_pin != (PinName)NC);
if(value)
    NRF_GPIO->OUTSET = (1ul << nrf_pin);
else
    NRF_GPIO->OUTCLR = (1ul << nrf_pin);

}

So IOs can be set with:
NRF_GPIO->OUTSET = (1ul << nrf_pin);

And cleared with:
NRF_GPIO->OUTCLR = (1ul << nrf_pin);